Way back in the early 2010s I was very "excited" about coffee script and similar projects. They sounded like they should be great for productivity. When I actually tried to write a project in coffee script, the results were the opposite of what I expected. The code was harder to read, harder to modify, harder to understand, harder to reason about. There's something about removing stuff from syntax that makes programm…
Go's error handling pattern is a great example of being overly explicit IMO. I personally like it, but I can understand why it causes so much controversy.
CoffeeScript for TypeScript
101–110 of 143 posts
Re: CoffeeScript for TypeScript
#102Re: CoffeeScript for TypeScript
#103Earlier quoted context omitted.
Rust is one of the few languages I've seen that really does error handling right. Errors are still values in Rust - usually as part of the `Result` type - but unlike Go, it actually has tools to let you deal with them in a convenient way, like the `?` propagation operator ( https://doc.rust-lang.org/book/ch09-02-recoverable-errors-wi... ), or the functions on the `Result` type like `map`, `and_then`, `map_err`, or cr…
The fact that the anyhow/thiserror crates are basically required, or you have to make a bespoke enum for your crate's errors and write conversion functions for them, is not great. The try operator and Result type is amazing though.
I don't see a problem with relying on a few super popular basic libraries for almost every project.
Re: CoffeeScript for TypeScript
#104What problem ist actually solved by being able to compile pseudo-languages like Coffeescript or Typescript into each other?
Re: CoffeeScript for TypeScript
#105Immediately getting ptsd of abandoned coffescript codebases
Re: CoffeeScript for TypeScript
#106I have had a non-trivial experience with CoffeeScript. Maybe one can find the syntax easier on the eye, but it is always at the cost of added ambiguity, both for the parser and the reader.
After one too many parsing error debug session in CS, I just moved back to plain JS (later, TS), only to be happy with it ever after. to the point that after this comment, I won’t even consider trying Civet further than their homepage.
Re: CoffeeScript for TypeScript
#107I'm not sure if getting some extra syntactic sugar is worth adopting a whole other language into a codebase: at least, that seemed to be one of the lessons from CoffeeScript.
That being said, as much as I liked using CoffeeScript in my own personal projects, adopting it for a non-trivial project at work probably turned out to be a net mistake all things considered. The only positive was that the .js output files where clean any easy enough to work with that we could quite easily just drop CoffeeScript and continue developing directly with those .js file
Re: CoffeeScript for TypeScript
#108Way back in the early 2010s I was very "excited" about coffee script and similar projects. They sounded like they should be great for productivity. When I actually tried to write a project in coffee script, the results were the opposite of what I expected. The code was harder to read, harder to modify, harder to understand, harder to reason about. There's something about removing stuff from syntax that makes programm…
Go's error handling pattern is a great example of being overly explicit IMO. I personally like it, but I can understand why it causes so much controversy.
if err != nil {
return err
}
...is that it's not even Error Handling. It's "Error Shovelling" (manual work to move the error from one place to another).Re: CoffeeScript for TypeScript
#109Not the first time I see the proposed pipe operator syntax but oh my god, did they have to make it so messy? data |> Object.keys |> console.log when you could have done |> data Object.keys console.log Or even better, don't introduce new syntax and just make it a simple function instead |>(data, Object.keys, console.log)) Yes yes, I know "|>" is not a legal variable/function name right now, but also, why not?!
I wouldn't put every method on a new line, though.
Re: CoffeeScript for TypeScript
#110Way back in the early 2010s I was very "excited" about coffee script and similar projects. They sounded like they should be great for productivity. When I actually tried to write a project in coffee script, the results were the opposite of what I expected. The code was harder to read, harder to modify, harder to understand, harder to reason about. There's something about removing stuff from syntax that makes programm…
As terse as possible for me, I think you underestimate the human brain.
I also know as a fact that programmers 100x my caliber have nevertheless written great large-scale software without types.
So I don't make generalizations on the human condition and just do what works for me!