Deno Is Webby
51–60 of 215 posts
Re: Deno Is Webby
#52Earlier 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?’.
> [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
#53Earlier 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.
Re: Deno Is Webby
#54Earlier 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.
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
#55Earlier 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?"
Re: Deno Is Webby
#56Earlier 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.
Re: Deno Is Webby
#57I'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"
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
#58This 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…
Re: Deno Is Webby
#59Earlier 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?"
Re: Deno Is Webby
#60Earlier 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…