kinjba11
The drive for 'number goes up' eliminates nuance and we lose something real but poorly quantified and thus not valued. And this dopamine fracking has been happening for a while, is the latest version of that. Whatever gets eyeballs and we can measure getting eyeballs, wins, despite the dystopian consequences.
The book 'The Score' by C Thi Nguyen goes into this, has given me a new way to see if something I value is actually just a metric I learned and unconsciously am following. He outlines 'four horsemen of bureaucracy' that have replaced more nuanced values: the need to scale (losing nuance and geographical variability), make something mechanical and repeatable (lose nuance and adaptability), replaceable parts (losing nuance, make everything fungible, humans as replaceable), and centralized control (lose individualized voices). These were great in the first wave as they've increased our standard of living and made e.g. mass production of medicine and such possible, but now as more ways are found to extract attention these forces are eating away at our lives
When I was a kid, I'd eat Trix cereal. I enjoyed it. Now - I find it sort of gross. It's too sweet. You can reach that same point with cake or pizza or a candy bar, etc. - in that, those foods become sort of gross. Foods like spinach become more satisfying. Not only that, but that satisfaction may yield a higher reward than you ever could with Trix cereal. But you'd never reach that higher level of satisfaction as long as you're eating Trix cereal every day.
Another good article for comparing GC between Go and C# https://medium.com/servicetitan-engineering/go-vs-c-part-2-g...
https://news.ycombinator.com/item?id=40075402 https://www.theverge.com/c/24070570/internet-cables-undersea...
As a side, it always strikes me as ironic that software developers are paid extremely well and yet hesitate to pay even a modest fee for the tools that enable them to do their job. Most "free" tools are not free - someone was paid to create them. IMO whether engineers are on a stable payroll is a differentiating aspect to why some tools succeed and become widely used and some don't. In the case of dev tools, our tech corporatocracy MAMA (Microsoft, Apple, Meta, Alphabet) pay engineers to make products like VS Code, then release for free. This is for eyeballs of course, because charging for the tools would get them nothing in comparison to their main platform revenue streams, which benefit hugely from the network effect.
> Why not develop Mojo in the open from the beginning?
> Mojo is a big project and has several architectural differences from previous languages. We believe a tight-knit group of engineers with a common vision can move faster than a community effort. This development approach is also well-established from other projects that are now open source (such as LLVM, Clang, Swift, MLIR, etc.).
https://docs.modular.com/mojo/faq.html#why-not-develop-mojo-...
My understanding with climate change is that we have signed up for a lot already, but much more is on the way if we don't make big changes faster. Humanity is a crisis-motivated species. The trouble with climate change is the effects so far have nearly no impact on power. If AMOC were to shut down in 2030 devastating Europe's economy, that could be the wake-up call to everyone to actually stop fossil-burning ourselves to doom for short-term conveniences.
On the flip side, without HN, my life would be totally different. I likely would not have pursued the much higher paying job I have now. My enthusiasm for technology and software would not be as high, seeing the many ways tech is used here. I would not be aware of meditation, notion, chatgpt, ml, postgres, cloud, rust go, wait but why, the inner platform effect, and so much else. For better or worse, HN shapes my outlook on the world. Is knowing all this worth the time spent, or is seeking knowledge simply addictive? I don't know.
A huge spike in CPU usage would be treated as a regression in other language runtimes and would likely be addressed. The fact that this is solvable with advanced JVM knobs is both good and bad. Good in the way you say. Bad because the complexity of maintaining all those knobs makes it difficult if not impossible to improve the runtime defaults, and every runtime problem becomes a tuning problem.
foo := Foo{"hello"}
fooPointer := &foo
fooPointer = nil
fmt.Println(fooPointer.Bar)
> panic: runtime error: invalid memory address or nil pointer dereference
In a language like Kotlin a compile time error would prevent `fooPointer.Bar`, and in Rust `nil` does not exist. Go also does not have sum types, see for instance https://making.pusher.com/alternatives-to-sum-types-in-go/Many remote salary workers regularly work 6 hour days. Getting more recognition for this seems like a good first step in getting acceptance for 4 days, 8 hours.
Nim is very close to Crystal. Some parts that might lead you to prefer Crystal however:
- Nim compiles to C code, meaning Nim is coupled to what C can do. I find compiling to C to be distasteful, C is not meant to be a compilation target. We should be getting away from C, IMO. Nim is limited to what C can achieve, and the design of the language trends towards "here's how this translates to C" as a result. Compiling to C is also an extra layer of abstraction, as now for instance with debugging you have to go through the C layer. Crystal like Rust uses LLVM
- Crystal also uses Ruby syntax, which many prefer. I have grown to dislike semantic whitespace such as how Python works, so this is a plus for me.
- Crystal has a garbage collector, period, and leans into that. Whereas Rust, Zig, and Nim want to give you complete control over memory, Crystal is more focused on being a better high-level programming language, competing with the likes of JVM/NET/Go/Ruby. This focus is likely Crystal's main edge. The only other single-executable opinionated GCed language is Go. Crystal's type system is much better than Go's. If Crystal can reduce compile times and capture some of Go's pragmatic aura, it will see more success.
Static typing - a fancy language feature - can immediately tell you the function deals with money. +1 for maintenance. Static typing with a solid IDE will immediately reveal everywhere the function is used. +1.
Languages shepherd you into certain designs or mistakes by making some things easier than others, such as when class inheritance can be easily abused in OO languages, cryptic one liners are easy in Perl, point-free cleverness in Haskell, monkey patching in dynamic languages, etc. +/-1 depending.
Per documentation, languages come with tools and best practices: Javadoc, Godoc, Rustdoc; C# even has a dedicated comment syntax for documentation - a fancy language feature. +1. No one does documentation, until the language tooling forces them to.
That said, BG (Before Git) and widespread use of source control, as in '96 to '02, was a dark age. We know more now.
- Mature support for async/await since 2012. Yes, Project Loom is coming, a decade later..
- Support for generic-aware value types (struct vs. class) and low-level features like stackalloc: very valuable for high-performance scenarios and native FFI. See for instance https://github.com/ixy-languages/ixy-languages. In comparison, Java doesn't even have unsigned integers. Yes, Project Valhalla is coming someday.
As well, debatable to some folks, but: properties (get/set); operator overloading; LINQ > Java streams; extension methods; default parameters; collection initializers; tuples; nullable reference types; a dozen smaller features
Not sure if you've missed this, but this is a number one reason many consider C++ absurdly complex. To actually know C++ is to know many different similar languages based on the year the code was written. C++20 is very different than C++03 as noted. Now compare this with C, or Go, Java, etc. which in comparison have barely changed.
I'm not one to argue, computers are fast. However, this would be a huge paradigm shift for the JavaScript ecosystem, where compile-to-JavaScript-tools like TypeScript are dominant. These tools have explicit goals to do type checking at compile time only and avoid generating anything at runtime. Runtime checking is redundant in this paradigm.
Now if you're arguing that the JS engines like V8 should be able to use type information for performance gains, I understand that wish. WebAssembly seems to be taking over the performance angle these days though, as it was designed from the start for that purpose, unlike JavaScript.
> You're kidding right? .. will be stripped before a JS engine ever sees it?
Yes. We're talking JavaScript here - billions of lines of which are compiled every year to ES5 ;-; with polyfills. Throwing away hundreds of useful features of ES2016+. This is par for the course, part of the JavaScript paradigm which this proposal understands.
> sounds like a feature for your console
That is fair, though it seems unlikely Chrome would adopt such a feature for their console without motivation. Perhaps.
> Which enforced the types
Python does not enforce types at runtime? You might be referring to something I'm not familiar with. Fired up Python 3.9. This works fine even though I'm passing strings for int.
def add(a: int, b: int):
return a + b
add("not ", "used") # 'not used'
> the cost of a mode switch is massiveBut earlier you said a JS engine can do this trivially? I don't understand how this is now difficult. Ultimately, if the types are enforced, you may as well go the full monty and support TypeScript in the browser, with Deno leading the way. Stop beating the JavaScript horse and all. That's the dream. This proposal is a compromise without a doubt, with the understanding that TypeScript in the browser is politically untenable at this point.
TS runs the checks at compile time and compiles to JavaScript without annotations. There is no runtime cost.
> related page load perf impact
Type annotations would likely still be stripped by minifiers, just like comments. No change.
> burn the syntax
As a dev that regularly uses TypeScript, being able to use debug builds with annotations and copy paste TypeScript into the console would save a lot of time. This would be part of larger trend of adding type annotations to dynamic languages. Python, Ruby, and other dynamic languages have blazed the trail here. There are ways to add enforcement in the future if needed, just look at 'use strict';