Share your repls and programming experiences

← Back to all posts
#WEEKLY CHALLENGE 3
darknew (9)

Well, here is my weekly submission. But let me tell you its story :
Because I wanted to learn Deno, I made it in Deno : I started regretting just an hour after. You see, it is said on Deno's main page that any js code can run in Deno : WRONG! At least, not on replit. I didn't know anything about typescript, and as you can see in my code, had to declare interfaces and a bunch of other typescript things. how to hate typescript in 5 sec

Anyway, I managed to finish the whole thing, my main issue being typescript. (Stack Overflow has been a great friend this week). I know my whole code is bulky and heavy and probably not optimized and ugly etc... But it works. In the end, it was a really cool challenge and taught me a lot of things!

Commentshotnewtop
StudentFires (292)

I have to disagree, Deno is amazing! Once you fully understand and learn TypeScript, you'll grow to prefer Deno over any other typescript implementation out there!
One small example of where it could've been simplerL

type dict = Record<string, number>;

If you wanted to write without regards to type, you could've just used the any type. let x: any;

Deno runs in strict mode by default, so any legacy JavaScript should fail in Deno.

Deno also won't allow blatantly poor decisions to be made. What is the result of [] + []? I'll never know, Deno simply won't permit that nonsense to even happen.

darknew (9)

@StudentFires Yes, you are right, writing this code allowed me to see the potential of Deno. It seems like a great language, secured and strict and etc... But for the moment, I still prefer the non sense of javascript.

StudentFires (292)

@darknew Well, may you one day learn TS, good luck until then!