CPU interrupt for breakpoint, https://wiki.osdev.org/Interrupt_Vector_Table
Wait what? I don't get why performance improvement implies reliability and incident improvement. For example, doing dangerous thing might be faster (no bound checks, weaker consistency guarantee, etc), but it clearly…
Pretty sure it stands for "Artificial abbreviation & hype GeneratIon" nowadays
It looks like it. Based on what I observe as an occasional tutor, it looks like compiler warnings & errors are scary for newcomers. Maybe it's because it shares the same thing that made math unpopular for most people: a…
There's no special keyword, just a "generic" type `IO<T>` defined in standard library which has a similar "tainting" property like `async` function coloring. Any side effect has to be performed inside `IO<T>` type,…
> Maybe in the future we don't use these things to write programs but if you think we're going to go the rest of history with just natural languages and leave all the precision to the AI, revisit why programming…
I'm curious, if tagged unions are a subset of sum type, what is your definition of "sum type"? AFAIK, tagged union is sum type, based on sum type mathematical definition.
> Those are both syntactically valid lines of code. (it's actually one of python's many warts). They are not ambiguous in any way. one is a number, the other is a tuple. They return something of a completely different…
> Code is much much harder to check for errors than an email. Disagree. Even though performing checks on dynamic PLs is much harder than on static ones, PLs are designed to be non-ambiguous. There should be exactly 1…
> Or is a big part of this concept only relevant for strong functional languages with sum types and pattern matching? It need not strictly be a pure functional language for type-driven style to be usable. Type-driven…
That's true, but then again, don't forget the fact that words might get interpreted as different things by different people. Words like "arrow", "functor", or "validate" might get interpreted slightly differently even…
> Because in those examples you can have a User whose email property is a ParseError and you still end up having to check "is the email property result for this user type Email or type ParseError?" In languages with a…
Coming from a more "average imperative" background like C and Java, outside of compiler or serde context, I don't think "parse" is a frequently used term there. The idea of "checking values to see whether they fulfill…
In the spirit of "Parse, Don't Validate", rather than encode "validation" information as a boolean to be checked at runtime, you can define `Email { raw: String }` and hide the constructor behind a "factory function"…
> This makes those tools, as powerful as they can be, unable to help us think about and enforce correctness across horizons that are not visible from the standpoint of a single project at a single point in time (systems…
No, there isn't. I guess you could pick a subset of a particular natural language such that it removes ambiguity. At that point, you're basically reinventing something like COBOL or Python. Ambiguity in natural…
This kind of comment reminds me of how broad "software development" is. On other HN posts, they're stating something like "software development is dead", "LLM as a compiler", "Do you read compiled assembly?", and so on.…
Why structural is more fundamental? C#'s anonymous type shares some flexibility of structural type system even though it still a nominal type. > A language would only need a single "newtype" or "nominal" keyword to…
It's still a useful distinction IMO. "Script" PLs tend to be interpreted, dynamic, and handwave various machine-level details. In contrast, "compiled" PLs usually provide you the constructs to manipulate native…
FWIW, FAFO is a very good way to learn. Assuming we can respawn indefinitely and preserve knowledge between respawns, driving fast and taking off your seatbelt would definitely teach you more than just reading a book.…
I always wondered if people actually find it beneficial to follow these "design patterns" or not. Personally, I prefer to learn FP patterns, which tend to be backed with nice mathematical properties behind them.
But in most cases you probably want something disjoint like Rust's `Result<T,E>`. In case of "it might be success with partial failure", you could go with unnamed tuples `(Option<T>,E)` or another approach.
That's needlessly aggressive. Ignoring webapps, you could do gamedev without even knowing what a matrix is. You don't even need such construction in most native applications, embedded systems, and OS kernel development.
Has too much sugar, and without JetBrains IDE you're stuck with a plain text editor. Not sure if it's generalizable to normal Kotlin or not, but learning Gradle Kotlin DSL made me want to rip my hair out when trying to…
I think it also depends on the community as well. Last time I touched Node.js and Javascript-related things, every time I tried to update something, it practically guaranteed something would explode for no reason. While…
CPU interrupt for breakpoint, https://wiki.osdev.org/Interrupt_Vector_Table
Wait what? I don't get why performance improvement implies reliability and incident improvement. For example, doing dangerous thing might be faster (no bound checks, weaker consistency guarantee, etc), but it clearly…
Pretty sure it stands for "Artificial abbreviation & hype GeneratIon" nowadays
It looks like it. Based on what I observe as an occasional tutor, it looks like compiler warnings & errors are scary for newcomers. Maybe it's because it shares the same thing that made math unpopular for most people: a…
There's no special keyword, just a "generic" type `IO<T>` defined in standard library which has a similar "tainting" property like `async` function coloring. Any side effect has to be performed inside `IO<T>` type,…
> Maybe in the future we don't use these things to write programs but if you think we're going to go the rest of history with just natural languages and leave all the precision to the AI, revisit why programming…
I'm curious, if tagged unions are a subset of sum type, what is your definition of "sum type"? AFAIK, tagged union is sum type, based on sum type mathematical definition.
> Those are both syntactically valid lines of code. (it's actually one of python's many warts). They are not ambiguous in any way. one is a number, the other is a tuple. They return something of a completely different…
> Code is much much harder to check for errors than an email. Disagree. Even though performing checks on dynamic PLs is much harder than on static ones, PLs are designed to be non-ambiguous. There should be exactly 1…
> Or is a big part of this concept only relevant for strong functional languages with sum types and pattern matching? It need not strictly be a pure functional language for type-driven style to be usable. Type-driven…
That's true, but then again, don't forget the fact that words might get interpreted as different things by different people. Words like "arrow", "functor", or "validate" might get interpreted slightly differently even…
> Because in those examples you can have a User whose email property is a ParseError and you still end up having to check "is the email property result for this user type Email or type ParseError?" In languages with a…
Coming from a more "average imperative" background like C and Java, outside of compiler or serde context, I don't think "parse" is a frequently used term there. The idea of "checking values to see whether they fulfill…
In the spirit of "Parse, Don't Validate", rather than encode "validation" information as a boolean to be checked at runtime, you can define `Email { raw: String }` and hide the constructor behind a "factory function"…
> This makes those tools, as powerful as they can be, unable to help us think about and enforce correctness across horizons that are not visible from the standpoint of a single project at a single point in time (systems…
No, there isn't. I guess you could pick a subset of a particular natural language such that it removes ambiguity. At that point, you're basically reinventing something like COBOL or Python. Ambiguity in natural…
This kind of comment reminds me of how broad "software development" is. On other HN posts, they're stating something like "software development is dead", "LLM as a compiler", "Do you read compiled assembly?", and so on.…
Why structural is more fundamental? C#'s anonymous type shares some flexibility of structural type system even though it still a nominal type. > A language would only need a single "newtype" or "nominal" keyword to…
It's still a useful distinction IMO. "Script" PLs tend to be interpreted, dynamic, and handwave various machine-level details. In contrast, "compiled" PLs usually provide you the constructs to manipulate native…
FWIW, FAFO is a very good way to learn. Assuming we can respawn indefinitely and preserve knowledge between respawns, driving fast and taking off your seatbelt would definitely teach you more than just reading a book.…
I always wondered if people actually find it beneficial to follow these "design patterns" or not. Personally, I prefer to learn FP patterns, which tend to be backed with nice mathematical properties behind them.
But in most cases you probably want something disjoint like Rust's `Result<T,E>`. In case of "it might be success with partial failure", you could go with unnamed tuples `(Option<T>,E)` or another approach.
That's needlessly aggressive. Ignoring webapps, you could do gamedev without even knowing what a matrix is. You don't even need such construction in most native applications, embedded systems, and OS kernel development.
Has too much sugar, and without JetBrains IDE you're stuck with a plain text editor. Not sure if it's generalizable to normal Kotlin or not, but learning Gradle Kotlin DSL made me want to rip my hair out when trying to…
I think it also depends on the community as well. Last time I touched Node.js and Javascript-related things, every time I tried to update something, it practically guaranteed something would explode for no reason. While…