3 ms·
Rule #1 of programming language web sites violated: - The landing page should always have some sample code (ideally more sophisticated than just "Hello world")
by hota_mazi 9y ago
Rule #1 of programming language web sites violated:
- The landing page should always have some sample code (ideally more sophisticated than just "Hello world").
- setr 9y agoTbh all that does is further enforce the policy that people judge a language based on immediate aesthetics; ie semicolons and parentheses usage. It might be what people are immediately interested in.. but I'm not sure it should be
- fasquoika 9y agoIf you do an example less trivial than "Hello world", it also lets people see a concrete example of the semantics, rather than just getting a high-level description of it
- nine_k 9y agoAdd a few examples of known / easy-to-grasp algorithms: sorting, processing of a stream / tree / graph, a concurrent interaction, some easy parsing, etc. A few examples on which your language shines, shows some of the key features that make it different and worth learning. Also, aesthetics do play a role: if your language is excessively hard to parse, or your examples contain a lot of copy-paste, etc, it might be a legitimate turn-off. It may be worth tolerating if other features are great. E.g. something like computing a convex hull of 2D points in APL or J may look terrible for an untrained eye, but you can nevertheless notice that it's like 40-50 characters total.
- setr 9y agoJ has an almost explicit goal of being concise; it is specifically a feature they're reaching for, and thus makes sense to promote in such a fashion. But its absurd to judge the language on its syntax, if the language is uninterested in the syntax, until its almost unnacceptably noisy or confounding. Looking into a language should ideally be first based on structural and semantic differences, and then syntactic. And a sufficiently semantically different language will offer little with its code snippets, as it wont make sense without understanding the paradigm. Even J; there's not much to take away other than that its dense from just the snippet. If anything, it mostly serves to scare people away as it approaches line noise, particularly when you don't yet know why it can be successful in such a fashion
- agumonkey 9y agoAlso, when all proglang website do and are the same, one new that replaces examples by long text, even though it requires my brain to actually think, grabs my attention in weird ways
- rtpg 9y agoOK maybe no direct code example but at least some conceptual stuff? I think I get what this is, but if there was something more succinct I would _know_ what this is.
- setr 9y agoIm just arguing that its not good to have code samples slapped onto the front page of every language, and particularly that this behavior shouldn't be "expected and glorified"; not that samples shouldn't be readily and easily available (they generally should be! Its part of the summary of the language)