9 ms·
Rust from a Gopher – Lessons 7, 8 and 9
- st1x7 6y agoAs a sidenote, does anyone else find the language identification terms cringey? Rustacean, gopher, pythonista... just atrocious.
- faceplanted 6y agoHonestly? No. I find them light-hearted and fun, they sound a bit silly but they're just part of the marketing and never have to be used if you're being serious, since you can always just say "____ programmers" and no-one will call you out on it.
- SPBS 6y agoI wouldn't say that it is cringey, but I agree with the sentiment. It always seemed kind of weird that programmers would attach themselves and identify with a programming language tribe, even though they are very well capable of learning other languages and frequently do.
- chrismorgan 6y agoYet each language does have defining characteristics, and you work differently in different languages. I regularly write both Rust and JavaScript, and I will design and architect things quite differently between the languages, playing to the strengths of each language. So languages are fairly tribal in this way, and in others also once you add the rest of their ecosystem.
- arethuza 6y agoCode that is written in one language in the style of another can be "interesting" - I once ported code that was Common Lisp written in the style of Occam... Also saw C sources that did the cpp thing of trying to make C look like Pascal, fortunately managed to avoid working on that!
- st1x7 6y agoThe terms also emerge for certain languages with a specific type of community around them. For example, I don't know if C++ developers really care enough to give themselves these kinds of labels.
- golergka 6y agoMost don't love the language that much. I'm not implying that it's a bad language though. Like Java, it's a very widely used language in enterprise and industry, and I think that most of the programmers in those languages view programming as just a 9-to-5, white collar job that puts food on the table. Nothing wrong with this view either, but it's not the kind of environment that would create memes or inside jokes. Rust, Haskell or Ocaml, on the other hand, are exactly the kind of languages that passionate programmers, that spend a lot of time in chatrooms and on forums like HN, would spend their time on.
- ReactiveJelly 6y agoThat makes sense. My enthusiasm for Rust is _because_ it lets me escape from C++. It's probably the same for Python and Go users.
- eru 6y agoWell, I sometimes use labels like these, but only in terms of 'what hat am I currently wearing'?
- coldtea 6y agoNo, the rest of us have a sense of humor.
- cpursley 6y agoI'm really glad Elixir devs are not referred to as "Sorcerers".
- MHordecki 6y agoWouldn't "Alchemists" fit even better?
- bovermyer 6y agoQuite the contrary - I love it. I don't identify as any of them myself, since I'd be some kind of unclassifiable chimera, but the touch of whimsy warms my heart.
- kostas_f 6y agoNope, it's fun
- sethammons 6y agoI’m noticing a trend of mostly younger people misusing “cringe” and I wonder if it may have to do with dumb videos on YouTube misusing it, or maybe the word is changing. To cringe is to feel disgust or embarrassment that results in a physical reaction such as a grimace. Generally, this can be felt watching very socially awkward situations. Is this what you mean? Or is there a better word, like immature, silly, strange, or something? I think most people are not feeling socially awkward or whatnot referring to a community by a mascot or other title. It is just a silly word for “practitioners of a given language.” We do that with all kinds of term, roles, titles, professions, hobbies, etc. Why does it make you cringe?
- LandR 6y agoI think cringe fits here. If I met a developer who said they were a gopher or rustacean or whatever. I'd feel physically embarrased for them.
- sethammons 6y ago"physically embarrassed". I like it; great distillation of the concept.
- steveklabnik 6y agoThe word “cringe” has morphed into “that makes me cringe,” yes. It’s more a certain segment of internet culture than “young people,” though.
- layoutIfNeeded 6y agoYes. Fanboyism in general is cringe, but these "quirky" names are pure 100% dev.to-level cringe. But to be honest, computer people were always more prone to cringey stuff than regular folk... (an extreme example would be the classic clip of Stallman eating dead skin from his feet) It's something with our upbringing I guess.
- JimTheMan 6y agoWell then hold on to your hat then and take a look at this: https://rustacean.net/ https://rustacean.net/ I mean it's an adorable crab! Who wouldn't want to join the rustacean legion behind Ferris. (Who is presumably named after Ferrous[Iron] which 'Rust's)
- okareaman 6y agoWhat do you propose as an alternative? "I am an aficionado of _____?"
- st1x7 6y ago> aficionado Just as I thought that it couldn't get worse. The alternative is to say that you're a developer in a given language or a user of the language. You don't have to create a whole tribe around it.
- pizza234 6y agoWhat's the rationale for making files modules? Modules being namespaces, and namespaces being collections, it's not desirable to have a file being a (large) collection of code. The feature that gives mixed feelings to the author (Re-exporting Imports) is indeed a workaround to this; since each file would externally generate one extra namespacing level, one reexports data structures in order to remove that level. This is odd, as it's essentially boilerplate by design. Am I missing something?
- q3k 6y agoYeah, Rust's module system is also something I find very difficult to work with after working with Go. Any time you end up with a lot of code/logic/types in a single module you have to either deal with a multi-kloc file, or try to shoehorn it into further namespacing, even if it doesn't make sense. Both options are annoying to both read and write, and I wish I could just split up complex modules into multiple files without the extra namespacing.
- eptcyka 6y ago`mod shard; use shard::*;` doesn't seem too bad IMO. Unlike Go, the compiler won't just parse all files in the source directory, but rather it'll build a tree of modules from the entry point and parse those.
- q3k 6y agoYes, but then you introduce new scope. If shard1::Foo depends on shard2::Foo, you then end up with a murder of import statements at the top of every file. Not to mention, splitting along the lines of inter-dependency does not necessarily correlate with splitting by readability/relevancy.
- eptcyka 6y agoYes, but this downside is not unique to Rust. It certainly exists in Java, Typescript, Kotlin and others. I'd much rather be certain where an imported type is coming from rather than having to search through all of the files. Of course, this is what an IDE should do, but even still, it saves the IDE's time. I fear long files less than the go module system.
- asplake 6y ago“Prelude” is borrowed from Haskell, right?
- tgv 6y agoALGOL-68 already had a prelude.
- kevincox 6y agoI agree the modules are annoying. I realize that the "standard" Rust style is import everything you need. However personally I have long worked with code that avoided imports and found it very helpful to read as it was obvious where each type of function was coming from. However the deeply nested imports makes that painful in a lot of Rust libraries. For example `std::time::Duration`, `std::path::Path`, std::cmp::Ordering`. I wish everything was just directly in `std` such as `std::Duration`, `std::Path` and `std::Ordering`. This re-export that the article talks about is doing this change (which I think is great!) while keeping a nice file structure. I think it is a shame that Rust conflates how you organize your code and how the user of your library sees it by default. However this seems like the best compromise. Example of this pattern in my code: https://gitlab.com/kevincox/mario-solver/-/blob/137ac5dea0676d82bb42c8dc0497c84155d69c85/src/lib.rs#L1-6 https://gitlab.com/kevincox/mario-solver/-/blob/137ac5dea067... (however since this isn't a library I use `pub(crate)` instead of `pub`. It works just fine with `pub` except you get a warning if the file doesn't have any exports which is a little annoying).
- faitswulff 6y agoEvery time this post series comes up I have to remember that it's mostly a summary of TRPL.
- okareaman 6y agoTime-Resolved Photoluminescence or Transient-receptor-potential-like protein?