|
Westie posted:There is consistency - it's about as consistent as custard. Keep jumping on it and you'll stay afloat, rest for a moment and you'll find yourself knee deep in the stuff. Underscores are the C++ STL's naming convention, not the C stdlib's. Hence why we have snprintf(3) and strtol(3) and not string_print_formatted_nbytes() and string_to_long() or whatever.
|
# ? Aug 19, 2014 14:30 |
|
|
# ? Jun 8, 2024 08:34 |
|
Sebbe posted:Brainfuck sticks pretty well to its one-character-per-instruction naming convention. I'm more of a fan of HQ9+, but there're hopefully some non-esolangs that answer my question. vvv I'm not familiar with C#, but I wondered if System.out.println shouldn't be System.out.printLn, or why it's not System.out.printLine (if not System.Out.printLine), from top of my head canis minor fucked around with this message at 15:03 on Aug 19, 2014 |
# ? Aug 19, 2014 14:30 |
|
eithedog posted:So, which language has naming consistency?
|
# ? Aug 19, 2014 14:38 |
|
eithedog posted:So, which language has naming consistency? I doubt any language is perfectly consistent. However, there are many languages that are consistent enough that "inconsistent naming" isn't one of the first things to spring to mind when thinking of their negatives.
|
# ? Aug 19, 2014 15:11 |
|
eithedog posted:So, which language has naming consistency? APL. ⌈ is the maximum function, ⌊ is the minimum. Similarly, ⌽ is reversal along the last axis, while ⊖ is along the first axis, and, of course, ⍉ reverses all axes. The rabbit hole goes all the way, too: ⍎ is the "eval" function. Conceptually, it is "turn text into APL value". What, then, is the behaviour of the obviously inverse symbol, ⍕? Well, it is the pretty-printer, of course, as that turns APL values into text! Oh, and the function for multiplying by π is of course ○. Athas fucked around with this message at 16:19 on Aug 19, 2014 |
# ? Aug 19, 2014 16:03 |
|
Plorkyeran posted:I don't remember ever encountering blatant inconsistencies in C# (VB.Net and F# both have some due also having stuff that uses non-.NET names), and while I haven't used Java much, it appears to have pretty consistent names. There's teeny things here and there, like text encodings have a method called GetBytes which returns a byte[]. Meanwhile, some of the types (Guid, BigInteger, et al) use ToByteArray for a byte[]. But they're inherently different functions because one takes in an input as an argument and the other acts on the thing itself. All in all, the core C# language is pretty darn consistent with regards to naming things.
|
# ? Aug 19, 2014 16:04 |
|
No Safe Word posted:There's teeny things here and there, like text encodings have a method called GetBytes which returns a byte[]. Meanwhile, some of the types (Guid, BigInteger, et al) use ToByteArray for a byte[]. But they're inherently different functions because one takes in an input as an argument and the other acts on the thing itself. All in all, the core C# language is pretty darn consistent with regards to naming things. At least they start the same way so you can find them easily. If it was ToArray and GetByteArray I'd be annoyed.
|
# ? Aug 19, 2014 16:12 |
|
There's good reason that APL has consistent terminology/notation- it was developed as a mathematical notation for manipulating arrays and was used in that manner for a number of years before the first interpreters that ran on real computers were written. Perhaps the takeaway could be that there is benefit to designing languages for human use first, and computer use second. APL does, however, get criticism for being a "closed system" because user-defined operators don't look anything like the builtins. Of course it also gets a lot of flak for not using an ascii alphabet and "normal" operator precedence rules, but I think that is less reasonable.
|
# ? Aug 19, 2014 16:16 |
|
Thermopyle posted:I doubt any language is perfectly consistent. Fair point, though I'd not say that about PHP as well (memory management ). Athas posted:APL. ⌈ is the maximum function, ⌊ is the minimum. Similarly, ⌽ is reversal along the last axis, while ⊖ is along the first axis, and, of course, ⍉ reverse all axes. It always amazes me how you APL people are able to remember all of these operators; however, even with these symbols, if A×B is multiplication, A○B should be group multiplication.
|
# ? Aug 19, 2014 16:21 |
|
Athas posted:APL. ⌈ is the maximum function, ⌊ is the minimum. Similarly, ⌽ is reversal along the last axis, while ⊖ is along the first axis, and, of course, ⍉ reverses all axes. Richard Stallman posted:Rho, rho, rho of X
|
# ? Aug 19, 2014 16:29 |
|
TheresaJayne posted:Knowing that. Is it such a bad thing? those who know better will not use it. Let the newbies use it until they realise that it is not as good as they thought - but by then they have the knowledge to know what is a better language. But this isn't what happens. People continue using PHP and then make exploit-ridden websites for large organizations.
|
# ? Aug 19, 2014 16:30 |
|
Zopotantor posted:And that is the entire extent of my APL knowledge. I don't know who posted:There's just three things a man must do,
|
# ? Aug 19, 2014 16:46 |
|
My experience with PHP is it feels like a dynamically-typed C/C++, with the worst of both worlds. On one hand, you got complete type fluidity, no scoping, poor debugging and error handling, behavior that can be unpredictable and hard to validate, etc. On the other, you got a low-level global API, dependency on includes and definition order, tacked-on OOP, inconsistency from constantly adding on more while maintaining all that came before, etc. Combine both (why would you) and it's a mindfuck.
|
# ? Aug 19, 2014 17:53 |
|
If you want to hear not so much a defense of PHP but a justification of why Facebook (natch) actually likes PHP and is sticking with it despite it's silliness: http://www.infoq.com/presentations/php-history
|
# ? Aug 19, 2014 19:33 |
|
No Safe Word posted:If you want to hear not so much a defense of PHP but a justification of why Facebook (natch) actually likes PHP and is sticking with it despite it's silliness: http://www.infoq.com/presentations/php-history Subjunctive literally just posted that! Stop astroturfing for PHP!
|
# ? Aug 19, 2014 19:49 |
|
ultramiraculous posted:Subjunctive literally just posted that! Stop astroturfing for PHP! Hah, missed it at the bottom of the last page. And believe me, I'm still pretty much on board with the whole "fractal of bad design" point of view.
|
# ? Aug 19, 2014 20:04 |
|
nielsm posted:Sorry, no. It's Japanese for "my way or the highway". Hence, you know, 'rails'. As in railroading. As in on a railway where you don't get to decide the direction you go in. It is sort of right there in the name.
|
# ? Aug 19, 2014 20:24 |
|
PHP Thread posted:Your argument here is that programming languages are meant for humans? Not computers? Honestly? This quote still has me laughing.
|
# ? Aug 19, 2014 21:05 |
|
feedmegin posted:Hence, you know, 'rails'. As in railroading. As in on a railway where you don't get to decide the direction you go in. It is sort of right there in the name. Rails is not even 'omakase' anymore in the way that dhh was talking about in that blog post from years ago. It provides defaults for things like ORM and templates but it's also really easy to substitute your own way of doing things. I think a lot of people come to Rails with no Ruby experience and things end up looking a lot more magical than they really are. In reality once you're in a controller method you're running plain old Ruby code and working with plain old Ruby objects and you can render whatever the hell you want back out. The real horror of Rails is how far dhh has his head up his rear end most of the time.
|
# ? Aug 19, 2014 21:18 |
|
kugutsu posted:Rails is not even 'omakase' anymore in the way that dhh was talking about in that blog post from years ago. That blog post was barely a year and a half ago.
|
# ? Aug 19, 2014 21:25 |
|
Fair enough. So dhh is completely ignorant about what people are doing with his own framework, which isn't surprising really.
|
# ? Aug 19, 2014 21:34 |
|
SupSuper posted:My experience with PHP is it feels like a dynamically-typed C/C++, with the worst of both worlds. On one hand, you got complete type fluidity, no scoping, poor debugging and error handling, behavior that can be unpredictable and hard to validate, etc. On the other, you got a low-level global API, dependency on includes and definition order, tacked-on OOP, inconsistency from constantly adding on more while maintaining all that came before, etc. Combine both (why would you) and it's a mindfuck. What about PHP reminds you of C/C++, other than maybe the things shared with all Algol-descendent languages? It lacks pointers, choice of representation, control over memory layout, explicit object lifecycles, and generics. Those to me are pretty fundamental to C-family languages. It also feels pretty different to program in the two, IME. PHP reminds me much more of Perl, if I had to find an analogue. No Safe Word posted:Hah, missed it at the bottom of the last page. And believe me, I'm still pretty much on board with the whole "fractal of bad design" point of view. You're the worst parachute account ever.
|
# ? Aug 19, 2014 21:54 |
|
Subjunctive posted:What about PHP reminds you of C/C++, other than maybe the things shared with all Algol-descendent languages? It lacks pointers, choice of representation, control over memory layout, explicit object lifecycles, and generics. Those to me are pretty fundamental to C-family languages. It also feels pretty different to program in the two, IME. PHP reminds me much more of Perl, if I had to find an analogue. Segfaults?
|
# ? Aug 19, 2014 22:01 |
|
Subjunctive posted:What about PHP reminds you of C/C++, other than maybe the things shared with all Algol-descendent languages? It lacks pointers, choice of representation, control over memory layout, explicit object lifecycles, and generics. Those to me are pretty fundamental to C-family languages. It also feels pretty different to program in the two, IME. PHP reminds me much more of Perl, if I had to find an analogue. There's a pretty straightforward list of similarities in the post you quoted (admittedly more to C++ than C) SupSuper posted:My experience with PHP is it feels like a dynamically-typed C/C++, with the worst of both worlds. On one hand, you got complete type fluidity, no scoping, poor debugging and error handling, behavior that can be unpredictable and hard to validate, etc. On the other, you got a low-level global API, dependency on includes and definition order, tacked-on OOP, inconsistency from constantly adding on more while maintaining all that came before, etc. Combine both (why would you) and it's a mindfuck.
|
# ? Aug 19, 2014 22:02 |
|
Subjunctive posted:What about PHP reminds you of C/C++, other than maybe the things shared with all Algol-descendent languages? He's probably referring to PHP's habit of exposing pretty thin wrappers over various C APIs, eg. the way the language exposes mysql_escape_string() and friends, and how common instructional materials prefer their usage over something further abstracted like DBI (e: I see PHP has PDO now, I am pleasantly surprised as I haven't used it in years; I hope it sees a lot of uptake).
|
# ? Aug 19, 2014 22:03 |
|
Subjunctive posted:Keith Adams gave a talk about why we still use and improve PHP at Facebook: http://www.infoq.com/presentations/php-history Am I missing something, or is this site going to make me create an account of some sort so that I can download the slides and mp3 separately, for a talk about PHP? gently caress everything about that.
|
# ? Aug 19, 2014 22:05 |
|
Steve French posted:Am I missing something, or is this site going to make me create an account of some sort so that I can download the slides and mp3 separately, for a talk about PHP? You could just, y'know, watch the embedded video.
|
# ? Aug 19, 2014 22:13 |
|
The short version of the talk is that PHP, possibly by complete accident, has characteristics which guide the design of web applications in good directions. Specifically:
It is argued that the large-scale architectural decisions which arise from these features/limitations serve large applications well from a maintenance perspective, to the point that it overrules the small-scale faults of the language and standard libraries. Facebook has then gone on to write tooling which attempts to mitigate some of those small-scale problems. I'm not sure I buy it entirely but it's kind of interesting to see vague similarity between what is said about PHP and the kind of architecture that is idiomatic in, say, Erlang.
|
# ? Aug 19, 2014 22:22 |
|
Steve French posted:Am I missing something, or is this site going to make me create an account of some sort so that I can download the slides and mp3 separately, for a talk about PHP? The slides aren't that useful without the video, I'd just watch the video. Here are the slides though
|
# ? Aug 19, 2014 22:31 |
|
GrumpyDoctor posted:There's a pretty straightforward list of similarities in the post you quoted (admittedly more to C++ than C) Huh, yeah. I have no excuse. What doesn't depend on declaration order? Java's imports do, python/Perl/ruby/JS do. I don't think C++'s OOP really feels tacked on at this point, but I guess if I squint; it certainly used to, though. If you saw C++ without knowledge of C, I wonder if you could tell which parts are forced by compatibility. There are probably examples of things that could be done more naturally but were twisted around due to heritage, but I haven't followed the evolution of the language closely enough to know of them. I'm not sure if I'd prefer well-written C++ to well-written Hack to take over from someone else, tbh, and my C++ is a fair bit stronger than my PHP.
|
# ? Aug 19, 2014 22:48 |
|
Internet Janitor posted:The short version of the talk is that PHP, possibly by complete accident, has characteristics which guide the design of web applications in good directions. Specifically: There's no remotely convincing reason to use PHP that doesn't involve having either a lot of legacy PHP code, or developers who are only familiar with PHP.
|
# ? Aug 19, 2014 22:55 |
|
Subjunctive posted:What doesn't depend on declaration order? Java's imports do, python/Perl/ruby/JS do. e: I guess maybe if they're both "import *" or some poo poo but that's not the usual case and certainly isn't the same kind of effect you get from textual inclusion or imports that can execute arbitrary code. Soricidus fucked around with this message at 22:59 on Aug 19, 2014 |
# ? Aug 19, 2014 22:57 |
|
Soricidus posted:Under what circumstances will switching the order of two import statements in Java affect the behaviour of the rest of the file? If you are wildcard importing, conflicting names are resolved in favour of the last import, no? "Don't do that, then", but that applies to a lot of the horrors we share here. ObHorror: Android doesn't have priority-inheriting locks, but it sure does have priority-inversion deadlocks! Edit: another nice side-effect of using PHP is that you tend to attract people who mostly want to get poo poo done, and care much less about the specific technology used to do that. You don't really get "language queens", though people definitely have language affinities. Basically none of our incoming engineers, proportionally, have meaningful PHP experience, so they learn how we do stuff and how to use our tools, and the legacy of "public" PHP practices aren't as relevant. (Going from working on Java server stuff or Android to PHP and getting that edit/reload feedback latency back feels pretty great, man.) Subjunctive fucked around with this message at 23:07 on Aug 19, 2014 |
# ? Aug 19, 2014 22:59 |
|
No Safe Word posted:If you want to hear not so much a defense of PHP but a justification of why Facebook (natch) actually likes PHP and is sticking with it despite it's silliness: http://www.infoq.com/presentations/php-history I'm not impressed. "Yes PHP is poo poo, but it's easy to start with, so if we reinvent it to make it look somewhat like a proper language in a really convoluted way, it's less poo poo yay". quote:(Going from working on Java server stuff or Android to PHP and getting that edit/reload feedback latency back feels pretty great, man.) pigdog fucked around with this message at 23:17 on Aug 19, 2014 |
# ? Aug 19, 2014 23:12 |
|
pigdog posted:I'm not impressed. "Yes PHP is poo poo, but it's easy to start with, so if we reinvent it to make it look somewhat like a proper language in a really convoluted way, it's less poo poo yay". Yeah, I think the talk is really more a description about how PHP worked out OK for them rather than a compelling argument for starting a new project in PHP. That they felt it necessary to create Hack in the first place indicates that PHP is a source of pain even if it didn't cause enough pain to destroy them.
|
# ? Aug 19, 2014 23:27 |
|
Subjunctive posted:Edit: another nice side-effect of using PHP is that you tend to attract people who mostly want to get poo poo done, and care much less about the specific technology used to do that. You don't really get "language queens", though people definitely have language affinities. Basically none of our incoming engineers, proportionally, have meaningful PHP experience, so they learn how we do stuff and how to use our tools, and the legacy of "public" PHP practices aren't as relevant. I hate to say this, but this really smacks of rationalization. It sounds like you have good hiring practices, not that PHP attracts good people.
|
# ? Aug 19, 2014 23:51 |
|
Thermopyle posted:I hate to say this, but this really smacks of rationalization. It sounds like you have good hiring practices, not that PHP attracts good people. Oh, I don't think use of PHP attracts basically anyone, as first-order effect (those it does attract are probably somewhat disappointed because our stuff doesn't look like typical PHP). In fact, I think it repels some people, especially those who are religious about technical purity. It would not be a reason to choose PHP, but I think that cultural filter is real and a nice side-effect. Our hiring practices are decent though, false positives like myself notwithstanding.
|
# ? Aug 20, 2014 00:02 |
|
Subjunctive posted:What about PHP reminds you of C/C++, other than maybe the things shared with all Algol-descendent languages? It lacks [...] generics. [...] fundamental to C-family languages Fundamental to C-family languages. Well, except C.
|
# ? Aug 20, 2014 01:01 |
|
Dessert Rose posted:Fundamental to C-family languages. Well, except C. Touché.
|
# ? Aug 20, 2014 01:03 |
|
|
# ? Jun 8, 2024 08:34 |
|
Subjunctive posted:Our hiring practices are decent though, false positives like myself notwithstanding. I've just never complained because I still hold out hope of Facebook someday deciding I was a false negative.
|
# ? Aug 20, 2014 01:59 |