3 ms·
I don’t understand the essential claims of this, which I think are “Mojo […] doesn't repeat Objective-C's mistake of using the component language as the base (
by Someone 3y ago
I don’t understand the essential claims of this, which I think are
“Mojo […] doesn't repeat Objective-C's mistake of using the component language as the base (which, inexplicably, Swift didn't just repeat, but actually doubled down on by largely deprecating objects).”
What does “largely deprecating objects” mean, and why would it imply “using the component language as the base”?
and
“it turns out that the connection language is actually the more general one, the component language is a specialisation of the connection language.”
I don’t understand that at all. You have a “blue collar” layer where bytes and bits get shuffled around and hands get dirty and a “white collar” layer where programmers pretend the world is made of legos and there’s no need to get your hands dirty to write programs.
A language can decide to only support the white collar layer, but if so, you still need a blue collar one in your interpreter/compiler/runtime (or, potentially, hardware)
You can, however, decide to only support the blue collar layer. C without the standard library does that, for example.
- jmull 3y agoI was confused by these things as well and here’s what I came up with: RE objects, I guess they are referring to Smalltalk-style objects. Objective-C has them while Swift has a somewhat different flavor of objects. This author seems to consider that a regression of sorts. RE the connection and component languages — your “white collar” and “blue collar” languages (BTW, I like your terminology, so I’ll use it), I think they are making the point that Objective-C started with a blue collar language, C, and extended it with while collar language features (derived from smalltalk), while Mojo started with a white collar language, Python, and are extending it with blue collar features. The author likes the Mojo approach, though doesn’t really explain that. I think they are claiming Swift is somehow more aligned with the blue collar side than Objective-C and feel that’s bad, but it’s too vague to really mean anything. (I think the idea with Swift and some other newer languages is that you can have a single language that is good at both white collar and blue collar things and “native” to both. I don’t think Swift has quite pulled it off, but it’s still evolving, so we’ll see.)
- deleted 3y ago[deleted]
- KnobbleMcKnees 3y agoSwift was always subject to a tug of war between the design purists - Chris and his ilk- and the product purists, i.e.Apple employees using Swift and with influence on Swift's design) The latter has silently won the war and any use of Swift as a systems programming lang/env is left as a "isn't it nice than you can" rather than a P1 design goal for the language (or even P2 for that matter) After 10 years and exposure to dozens of languages, I find Swift to be utterly delightful to write anything with, and wish that it did have the drive behind it to become a more generalized and cross platform. language, but I'm under no illusions that it will while pre-WWDC and pre-product-unveiling narratives are driving the direction of the language from the back seat of the car.
- kitsunesoba 3y agoI too would like to see Swift's cross-platform/generalist story improve. It is improving, albeit slowly because it's an effort driven more by the community than by Apple.
- layer8 3y agoThis is an interesting application of the blue/white collar terminology. I would have expected it to be used the other way around, white collar requiring more education, and blue collar being more pragmatic.
- Someone 3y agoWhy would you think white collar work requires more education? IMO, top-end blue collar educations such as engineering or medical degrees certainly don’t take less time than white-collar ones such as law school or an MBA.
- jimbokun 3y agoIt's just a description of how the languages were designed. With Objective-C, they started with the "blue collar" language (C) as the base language, and added in "white collar" language features (Smalltalk), to achieve a language where you could switch between blue collar and white collar programming without switching languages. Mojo starts with the white collar language (Python) and adds blue collar language features to it (the Mojo additions that allow you to control the memory layout and execution at a lower level). That's really all the article is saying.
- Someone 3y agoBut IMO Swift started white-collar, too, with its reference-counting, abort-on-integer-overflow, copy-on-write collections, characters whose size in bytes isn’t fixed, no (or limited, being GCD-only? I don’t remember exactly) multithreading, etc. Yes, it was presented as being a systems language, too, but that convinced very few (and still doesn’t convince many, I think. The language is moving there, but it will be a while before it gets there, if ever) So, why claim Swift more than repeated “Objective-C's mistake of using the component language as the base”?
- mpweiher 3y agoWell, the analogy is incorrect, so yes, it doesn't fit. ¯\_(ツ)_/¯
- tialaramex 3y agoC is definitely not your hypothetical "blue collar" layer. For example C has types, I assure you the machine does not actually have types.
- iainmerrick 3y agoThat depends on what the "has" means in "has types". If you want to multiply two words, you need to decide whether they're integers or floats -- those are types! If C isn't blue collar enough for you, nothing is, beyond assembly.
- mpweiher 3y ago> You have a “blue collar” layer where bytes and bits get shuffled around and hands get dirty and a “white collar” layer where programmers pretend the world is made of legos and there’s no need to get your hands dirty to write programs. Nope. The analogy you came up with is interesting, but although there is some overlap, it doesn't really capture the distinction and is the reason why you're not understanding the bit I wrote about connection languages and component languages. You can have a component language that is just as "white collar" as the connection language. And you can (probably) have a connection language that is quite blue collar, although that might be a bit harder. The reason I find your analogy interesting is that despite actually not capturing what is there, it does seem to capture how many people (erroneously) view and use the distinction between connection and component languages. Objective-C added Smalltalk as a connection language, a language for plugging together the Software ICs you would write in C. See, for example https://blog.metaobject.com/2019/01/swifter-sieving-of-primes-with-software.html https://blog.metaobject.com/2019/01/swifter-sieving-of-prime... It did not add Smalltalk as a "white collar" language that didn't need to get its hands dirty, and it didn't have the facilities to do that. Over time, people discovered that the connection language was in many ways more convenient to use, and so did what you describe, use it as a "higher level", more "white collar" language. But once again, that was an abuse of the language, it wasn't made for that and, due to not being made for it, it wasn't very good at it. Even after they added some facilities to make that use-case more possible.