Live data from Hacker News

Deno Is Webby

blog.jim-nielsen.com

51–60 of 215 posts

Re: Deno Is Webby

#52

Earlier quoted context omitted.

After using typed backend languages like Rust and even Go (which is painful in its own right, in my perspective) I would hate to work again on a big Ruby or Python codebase. They feel just as disgusting, to use your metaphor, as using plain Javascript instead of Typescript. > why wasn’t there such a massive push for types in those languages Are you just choosing to ignore all of the history of type checking Python an…

Look, this is going to back and forth. Take a time machine to pre Web 2.0 and explain to everyone why OOP programming sucks. I’d dare you to take it off your resume. But we’re here now right? It’s not hard for me to imagine the reversal of this trend inevitably where everyone goes ‘the fuck are we writing all these verbose types for this dumb web app for?’.

I really don't see what the back and forth is. Types are not inherently a fad - but there can be people who promote them with fanaticism as a cure-all or for problems they can't solve. There were people skeptical and critical of OOP when it was popular. I don't believe that OOP is inherently a fad either - it has its place. Different paradigms just get caught in the windstorm of fad interest.

> [why] are we writing all these verbose types for this dumb web app for?

You can take anything to the extreme, but types are a zero risk, low effort investment that has a quick return. If someone over-types something it's hardly a problem compared to an over engineered OOP codebase.

Re: Deno Is Webby

#53

Earlier quoted context omitted.

I'd argue truthiness implicated by the presence of an object is more logical than having an arbitrary definition of truthiness depending on the data type. If I have a cup that's empty, there's still a cup there. It's presumptuous to assume I care about the contents.

In that case "" should be truthy. And 0 should be truthy too probably.

Yes and yes. Ruby got it right, no question :)

Re: Deno Is Webby

#54

Earlier quoted context omitted.

[] should be falsey so it can be used in an if(). I'm not sure about macros. I kind of want to see `with` back also. The problem with it was ambiguity. The syntax could be adjusted to avoid the ambiguity. .e.g `.prop = val;` could be legal inside the block. But "why though" you ask. A `with` block makes it visually obvious that a block of code is specifically relating to getters/setters on a particular object instanc…

I'd argue truthiness implicated by the presence of an object is more logical than having an arbitrary definition of truthiness depending on the data type. If I have a cup that's empty, there's still a cup there. It's presumptuous to assume I care about the contents.

There's a presumption either way. You can make the presumption JS did for [] (and there's probably no turning back), you can even argue explicit is better than implicit (vs the value of context-sensitive concision).

But it's also not consistent with the ways that other empty but typed cups are treated ("" for the empty string, 0 for empty count / quantity, both of which are false-y). Different presumptions for different types of cups carries its own implicit hazards from context sensitivity.

Re: Deno Is Webby

#55

Earlier quoted context omitted.

A couple of questions: “Make [] false-y” Why? “Add macros” Why? How? “Bring back `with`” Why?

Not GP, but I really like [] being false in ruby and python because I often want to ask "is this variable that should hold a collection holding a collection of things, or is it empty/false?"

[] is truthy in Ruby. Only false and nil are falsy.

Re: Deno Is Webby

#56
post #15

Earlier quoted context omitted.

Deno has a standard library that wants to be 'batteries included' so you don't have nonsense like a third party package for left padding a string (deno supports string padStart natively for this for example).

Everything supports padStart natively, for almost half a decade by now.

I'm referring to the left-pad package on npm that infamously ignited a huge controversy years ago and started some of the cracks in the entire ecosystem that are growing larger and larger today. For more context: https://qz.com/646467/how-one-programmer-broke-the-internet-...

Re: Deno Is Webby

#57

I'm sorry but all those examples and Deno's documentation in general should be in JavaScript. I respect the devs right to choose which ever language they want, but Deno seems to want to be the standard bearer for the power of scripting and web standards [1]. If that's the case, then they are causing more harm than good by focusing exclusively on TypeScript, which isn't a language as much as a set of macros on top of…

> not promoted as some sort of better alternative to JavaScript, because it's really not. This leaves me skeptical if you have extensive experience with Typescript. It's way more than "oh this is a number not a string." It's "you forgot this property on an object's return type that you built from a response value" or "your Redux reducer doesn't handle all of the possible action types so it will crash at run time"

"your Redux reducer doesn't handle all of the possible action types so it will crash at run time"

And what are all these dr. Strange multiverse possibilities you speak of? Any semi seasoned JS dev has spidey sense for watching out for null and undefined, and generally you should know the type of what you are returning. Is there that much variability in what you are dealing with? If it’s an array of objects, that’s not hard to hold in your brain, just watch out for empty arrays or null/undefined items.

Re: Deno Is Webby

#58
post #4

This is nice, until its not. I have spent a fair amount of time over the last several years trying to make node act like the browser, or vice versa. It's doubly confusing to juniors who don't understand the difference between a language and a runtime. alert() looks like a standard function and should be specified by the ECMAScript Language Specification. But its actually specified by the HTML standard, because its Wi…

TypeScript is really helpful for this because you can specify what runtime(s) you expect your code to run in with the `lib` configuration. Looks like Deno provides its own versions of libraries: https://deno.land/manual/typescript/configuration

Re: Deno Is Webby

#59

Earlier quoted context omitted.

A couple of questions: “Make [] false-y” Why? “Add macros” Why? How? “Bring back `with`” Why?

Not GP, but I really like [] being false in ruby and python because I often want to ask "is this variable that should hold a collection holding a collection of things, or is it empty/false?"

[] is truthy in Ruby but there is #empty? on collection types. Rails also has #blank? which additionally works on false and nil.

Re: Deno Is Webby

#60

Earlier quoted context omitted.

Look, this is going to back and forth. Take a time machine to pre Web 2.0 and explain to everyone why OOP programming sucks. I’d dare you to take it off your resume. But we’re here now right? It’s not hard for me to imagine the reversal of this trend inevitably where everyone goes ‘the fuck are we writing all these verbose types for this dumb web app for?’.

I really don't see what the back and forth is. Types are not inherently a fad - but there can be people who promote them with fanaticism as a cure-all or for problems they can't solve. There were people skeptical and critical of OOP when it was popular. I don't believe that OOP is inherently a fad either - it has its place. Different paradigms just get caught in the windstorm of fad interest. > [why] are we writing a…

I guess thats my main deal breaker. It’s simply another foot gun to allow people to over abstract. I have no issues with modest typing, it’s nice, it’s clear. I have issues with what entropy inevitably does.
Post reply on HN