7 ms·
Please don't take this personally. I think it's great that you wanted to push Rust to the area where Java flourished (by Java I'm guessing Enterprise?). I resp
by hello_moto 7y ago
Please don't take this personally.
I think it's great that you wanted to push Rust to the area where Java flourished (by Java I'm guessing Enterprise?). I respect your passion.
Personally, I never like a language that has esoteric syntax utilizing various non-alphabetical characters. Perhaps this particular aspect is what drew me to languages like Java/JavaScript. I don't mind writing "public static void" because writing code is like 10-20% (the rest is code-review, meeting stakeholders/Product Owner/PM, come up with plans, write documentations, etc) of my activity throughout a decade of my career as a Dev.
There are some caveats (or rather ... personal dislike) with Java and JavaScript for example: I don't like the Closure syntax in Java and I don't like the fact that JavaScript lacks cohesiveness => People who write ES5 code do have to implement patterns specific to JS in order to re-create some of the OOP constructs. ES6 with Class/constructor/static syntax help but then they added generator via '*' (asterisk, but why? why don't use the keyword 'gen' or 'generator' just like async/await keywords?).
The other thing I realized lately is that I prefer GC platform/ecosystem so that I can focus less on the platform itself.
- sbov 7y agoI'm curious what esoteric syntax utilizing various non-alphabetical characters you're talking about in Rust? I recently started learning it and nothing jumps out to me as particularly egregious.
- steveklabnik 7y agoThere are three ways this objection is usually expressed: 1. Long ago, Rust had some interesting built in syntax for different kinds of pointers, and so people checked out Rust then, and didn't realize we got rid of it. This objection has happened less and less since that was ~5 years ago (wow time flies), but sometimes it still comes up. 2. The lifetime syntax uses a single apostrophe, like 'a. We took this syntax from OCaml (though slightly re-purposed), but if you haven't used OCaml, and many have not, it can feel very weird. 3. Not everyone prefers the "curly braces and semicolons" style of systems languages, and so they feel the <>s and ::s and {}s and ;s are noisy. We kept this style to be familiar to systems programmers. In general, Rust doesn't have a lot of unique syntax, but it does draw from two generally disparate areas: functional languages and systems languages. If you haven't used both before, some of it can feel strange. It happens.
- hello_moto 7y agoSomewhat agree with this explanation. I started my journey from QBasic (high-school) to C/C++ (college) to Java to JavaScript and I have to admit that I use Java/JS the most throughout my career so my experience is biased toward my own personal experience. Had I stuck with C/C++ for 10 years and dabble with Haskell/OCaml at night, I might feel different. Once I got stuck in Java, I felt very comfortable there.
- ncmncm 7y agoYes: http://blog.plover.com/prog/Java.html http://blog.plover.com/prog/Java.html Money quote: "I enjoyed programming in Java, and being relieved of the responsibility for producing a quality product."
- hello_moto 7y agoMeh ¯\_(ツ)_/¯. It is his opinion, not a fact. I never believe in connecting programming language with quality product because I see no evidence.
- ncmncm 7y agoI don't doubt his enjoyment, or his reason for it. People gravitate to work using languages with characteristics that suit them. Most people coding Java would be less happy with something else, and most people using something else would be less happy obliged to use Java.
- hello_moto 7y agoYou have a point there. Though, I can accept JS and Go (the last one takes a while).
- agumonkey 7y agoADA uses ' as syntax, and I hated it :)
- 7y ago
- hello_moto 7y agohttps://doc.rust-lang.org/book/ch12-04-testing-the-librarys-functionality.html https://doc.rust-lang.org/book/ch12-04-testing-the-librarys-... pub fn search<'a>(query: &str, contents: &'a str) -> Vec<&'a str> { vec![] }
- steveklabnik 7y agoYou didn't elaborate on exactly what you find esoteric about all of this, but here's all the non [a-zA-Z] characters, what they do, and how they relate to my sibling comment about objections: <> for generics. Point 3. 'a for a lifetime. Point 2. () , and {} for function syntax. Point 3. pattern: type for arguments. This is in a few different languages, and doesn't fit into my below points, but the paragraph I made after the point. & for references, point 3. -> for the return type of functions. In the paragraph after. ! to indicate that vec! is a macro. This is pretty unique, actually. Ruby does let you use ! in function names, but that's not really the same thing. [] is used to invoke vec! similarly to how you index anything else, that is, this creates an empty vec, like [] would create an empty array. This is sorta point 3 and the final paragraph. None of this is to say that you're wrong about this; I think it just really demonstrates how hard it is to please people with syntax. None of this is unique to Rust, but the combination of influences is.
- hello_moto 7y ago> I think it just really demonstrates how hard it is to please people with syntax There's no silver bullet just like anything else. It's a matter of preference. Generics is fine (exist in C++ and Java). Although I dislike crazy generics <T<S>> but that could be design problem. <'a> (yeah technically it's just the 'a. "->" non-alphabet, I came from C family (C/C++/Java) so return type stated earlier as part as the whole long-train of ceremonial stuff alongside the modifier (public static int myMethod) Pointers and Reference: not my cup of tea but I understand it's important for system language. Others can argue its importance for "business apps" (or web-apps) but I never need pointers and references so _shrug_. semi colon after input parameter: query: &str vs string query contents: &'a str Vec<&'searching str> <--- the fact that now you can combine these non-alphabet stuff together => "&'a". vec![] => exclamation mark squeezed between what appears to be a keyword "vec" and an array syntax Again, don't get to riled up. I just personally don't enjoy reading syntax like this.
- vardump 7y ago> Personally, I never like a language that has esoteric syntax utilizing various non-alphabetical characters. Check out COBOL. You'll love it. :-)
- hello_moto 7y agoCan't do Big-Data, no libraries.
- twic 7y agoI'm working in quant finance, and i'm using Rust. I suppose some of us are scared of punctuation, and some of us aren't.
- danielscrubs 7y agoFor me Java signals cheap labor. You’re not going to get a high five for speeding the server code up 38% nor are you going to get one for finding 23 bugs not in Jira. It’s the janitor fixing a broken bulb. You are not going to find people that knows about avx or red-black trees in a Javashop in my experience. That said, I’d hire them just don’t want to be them.
- hello_moto 7y agoWow... I mean... just wow... > avx or red-black trees in a Javashop in my experience. You meant AVL right? As much as I dislike Leetcode and whiteboarding interview culture, there's an army of people who know these stuff (data structure) working for Google (largely Java shop), Amazon (boy, this one is a HUGE Java shop) LinkedIN (o yea, o yeaa...) Square, Twitter, etc. I can go on but let's just stop there. Try LeetCode and see how many submissions are in Java :). I'd say it's probably the most-used programming languages doing whiteboard data-structure styled interview.
- danielscrubs 7y agoAVX (https://en.wikipedia.org/wiki/Advanced_Vector_Extensions https://en.wikipedia.org/wiki/Advanced_Vector_Extensions). It's weird to bring up big companies as they use every language under the sun and of course, they want beginner friendly languages for a big chunk of their work. But I do think you underestimate the number of times they reach out for systems languages like C++, heck Fortran beats Java in numerical computing. I haven't heard about LeetCode so I cannot comment on that. A site for unemployeed coders to find work?
- hello_moto 7y agoLeetcode is the de-facto du-jour place to practice your algorithms chop for interviews for majority of the Valley/Seattle/NYC companies (and maybe extend that to Austin as well, pretty much any big-tech-hub cities). Heck even up north in Canada (Vancouver/Toronto), I heard companies have adopted that model as well. > It's weird to bring up big companies as they use every language under the sun and of course Why is it weird? it's the reality and they have massive amount of engineers that use Java/JavaScript. For those who want massive salary, good-looking resume, and potential to work on solving interesting problem (potential, not guaranteed), they will have to prepare (grind) for the technical interview at Leetcode. Some take months. > But I do think you underestimate the number of times they reach out for systems languages like C++ I don't. Amazon+LinkedIN+Twitter are super massive Java shops. Let me turn the table around... If you haven't heard Leetcode by now then well...¯\_(ツ)_/¯ (pardon me, I don't mean to attack you but this uhm... crazy whiteboarding/leetcode movement started in 2016 and have been taking our industry by storm). Maybe you should try the site and solve 30 problems ranging from EASY, MEDIUM, and HARD to get some idea. Hi-tech companies these days expect fresh-grad to be able to solve MEDIUM (trie, some combo-algo, dynamic programming, backtracking, string algo) level questions within 15-30 minutes.