4 ms·
Thanks for answering about unsigned numbers. I don't believe Rust is anything like Swift. Do you think that by "like Swift" it just meant "languages where an o
by quietbritishjim 6y ago
Thanks for answering about unsigned numbers.
I don't believe Rust is anything like Swift. Do you think that by "like Swift" it just meant "languages where an overflow will result in the program aborting its execution"? If so then that was a pretty useless tautology. (I had assumed it meant something like "like Java" meaning any language that uses the JVM.)
- masklinn 6y ago> I don't believe Rust is anything like Swift. Do you think that by "like Swift" it just meant "languages where an overflow will result in the program aborting its execution"? That's literally the sole and entire subject of the article, what else would it mean? > If so then that was a pretty useless tautology. The wording is odd but it's a useful classification because it's an extremely uncommon behaviour. > I had assumed it meant something like "like Java" meaning any language that uses the JVM. That… doesn't make any sense.
- quietbritishjim 6y agoI don't see what your confusion is with my confusion! Something like "this thing is true about those languages where it's true" would be a totally worthless thing to say: it communicates zero actual information. It doesn't even say there actually is any one language (apart from Swift itself) that satisfies it. Why would the article include an empty statement like that? Even if it's conceivable that it does, surely it's reasonable for me to ask if there's an alternative interpretation that actually had some useful meaning? > what else would it mean? It could be that "languages like Swift" refers to a collection of related languages which are pretty obvious if you're familiar with them regardless of this overflow stuff. That is actually the more obvious interpretation to me, because saying that they all share the same overflow behaviour would be meaningful non-trivial information. I think that's a reasonable thing to think given that "language like X" makes sense for a lot of languages. Maybe Java wasn't the best example, but if someone said "lisp-like" languages or "JavaScript-like languages" you might have an idea what they mean. As I said, I'm not familiar with Swift so for all I know "Swift-like" could make sense too. But it raises the question: what languages would that phrase include? That's why I asked.
- quietbritishjim 6y agoAfter all that mumbo-jumbo I now see your point (not that you're still reading...). I was reading it literally but it was just very badly written. It can be fixed up like this to have the meaning you suggested: > In some programming languages, like Swift, an overflow will result in the program aborting its execution.