8 ms·
WTF Is T_paamayim_nekudotayim (2013)
- deleted 4y ago[deleted]
- NotYourLawyer 4y agoMirror because page doesn’t display properly for me. https://archive.ph/ACL9Q https://archive.ph/ACL9Q
- borbulon 4y agoThanks, looks like we have it the HOD.
- NotYourLawyer 4y agoDifferent problem earlier. The text would come up for just a split second and then disappear.
- readthenotes1 4y agoWhat color is the error message?
- userbinator 4y agoI don't even use PHP regularly anymore, and never did encounter that message even when I did --- probably because my use of PHP predated all the OOP stuff --- but I still remember that word after reading articles about this precisely because it's so memorable. It's sad to see that they removed it in an attempt to effectively dumb down the language even more to cater to those not willing to use their brains and learn a bit about its (IMHO interesting) history. The other example of memorable words that I associate with a programming language are car and cdr.
- pixl97 4y agoI remember running into this error back in the day and wondering why it was named in such a manner I had to search it up rather than getting an explanation on what actually went wrong. These people wanted to make things hard for no good reason.
- School-Cotton 4y agoInterestingly enough clojure (probably the most widely-used lisp in the real world) uses “first” and “rest”.
- Ma8ee 4y agoAnd in the theme of the post, I kind of miss those old terms that I remember fondly from learning Scheme a long time ago. Using them felt like incarnating some ancient magic. That said, the terms "first" and "rest" are superior, and one of the things I love about Clojure is that it never makes anything obscure.
- nivertech 4y agoI don't get it. What was wrong with the following abbreviations: "Contents of the Address Register" (CAR), "Contents of the Decrement Register" (CDR)? IMO they're self-describing. It also allow you to use all the premutations of Address and Decrement registers: C[A|D]+R. How do you do this with "first" and "rest"? ;)
- lispm 4y agoLisp uses these names decades before Clojure, see for example the Lisp Machine Manual from 1979 which documents first, second, ..., seventh, rest1, rest2, ...
- School-Cotton 4y agoPerhaps, but the difference is that Clojure primarily uses first/rest, and doesn't have car/cdr at all (AFAIK).
- notamy 4y ago> It's sad to see that they removed it in an attempt to effectively dumb down the language even more to cater to those not willing to use their brains and learn a bit about its (IMHO interesting) history. As an alternative explanation, perhaps people don't want to be using Google to look up an obscure error message when they're in the middle of writing code, when the error message could be better and the history of the programming language is irrelevant to the problem at hand?
- crdrost 4y agoThey often don't even know that's an option. Here's the deal. Haskell has “Functor” (mappable), “Monoid” (aggregate/summary), “Foldable” (summarizable), “Monad” (context/commandlike). This language comes from a lot of early adopters being math nerds of a sort. It is a barrier to entry, and everyone understands that. PHP’s situation is worse because, you know what's true about PHP developers? They are often just learning programming. It is an entry-level language, something you can throw into the HTML you already have to make some magic happen. Yes it can be so much more, but it ALSO is a lot of peoples' first look at programming. When you chose to learn Haskell you knew you were jumping in the deep end. The sitch with PHP is grown adults nearly drowning in a kiddie pool. Look, when Haskell condescends to me, “Your rigid skolem type variables are bound by the type signature for fizzBuzz!” I know as a seasoned programmer that I am experiencing my own masochism and that I should probably Google away and that I may end up having to read a PDF by Dr. Craig T. Skolem to find out why he has a species of type variables named after him. But if you are just starting out? It just makes you feel like you will never be able to do this and why did you even try. So keep T_PAAMAYIM_NEKUDOTAYIM in the error message, feel free, I don't care. But IF it is there, please include in your English error messages in some brackets, “(that’s Hebrew for ‘double colon’, it helps for searching errors online)” or something like that. If you find that line in the error message smug/condescending, then T_PAAMAYIM_NEKUDOTAYIM is all the more smug, because it has the same implications but hidden behind an extra smug superiority, “you don't know the history of this language, do you?!” Or, on the flip side, as long as the error message explains what went wrong and hints how to fix it, feel free to inject a mini Hebrew lesson into my day, sure.
- 4y ago
- TheRealPomax 4y agoIf you want to learn the history, go read "the history of PHP". There's tons opf it, none of it relevant to people who want to program modern PHP. If you want to actually use PHP, or any other language, and the interpreter/compiler throws up errors that _cannot be understood_ by "using your brain" then that is both a bad design decision that should have been changed way back when, _and_ is a current bug in your interpreter/compiler that you need to fix.
- userbinator 4y ago
- 2143 4y ago> complaining about how everything should be "easy" Not the worst thing to complain about. Things that ought to be easy should be easy, so that time can be spent on solving hard problems. T_PAAMAYIM_NEKUDOTAYIM is an example of something easy made deliberately hard. Thousands of people had to search for it (it adds up in the aggregate). And not only that, now there's mundane debates around whether or not it was a bad idea (such as right here, but also in the linked article). Further waste of time. Could've all been avoided.
- wruza 4y agoIt’s not that hard, right. Nothing is really hard when an explanation is one search keyword away. But even a little bit becomes an issue when you fed up. This has nothing to do with skills and intelligence, the argument is emotional. If you don’t get fed up bit by bit in our profession or you work at the place where you have plenty of time to digest anything irrelevant, lucky you.
- usrbinbash 4y agoBecause programming languages are tools, and tools should be as simple as possible, and as complex as they have to be. It's not the tools job to be needlessly complex. Tools exist so we can build complex things with them.
- School-Cotton 4y ago
- kragen 4y agoever since learning this i call :: the paamayim nekudotayim, for example in c++ or rust unfortunately because i speak almost no hebrew i have to look it up every time
- RobotToaster 4y agoJust hope you never have to pronounce it.
- kragen 4y agowhy i think hebrew is fairly phonologically simple, isn't it on glancing at the overview, the only thing that looks remotely challenging is that [χ] (כ or ח) contrasts with [ʁ] (ר) even the vowel system is roughly the same five-vowel system used by languages like spanish (and nearly japanese), and both consonantal gemination and phonemic vowel length have been dropped in modern hebrew we're not talking about something like keresan here so what are you on about
- svnpenn 4y agoDo you realize how ridiculous you sound? 99% of people aren't going to know how to pronounce this, and even ones that think they do probably get it wrong.
- kragen 4y ago99% of people don't know how to calculate the pressure loss due to turbulent flow through a long pipe either but they can look it up the nice thing about languages with a relatively small inventory of phonemes is that getting pronunciations wrong is kind of hard at worst you just sound like you have a weird accent it's not like french or portuguese or chinese or ... probably if i sound ridiculous to you it's because you're so out of your depth in the conversation you don't even know what knowledge you're missing, just like when i corrected you in https://news.ycombinator.com/item?id=33753071 https://news.ycombinator.com/item?id=33753071 you would probably find it more to your advantage to try to learn the relevant things you don't know than to attempt to ridicule other people for knowing them
- kidlj 4y ago
- TazeTSchnitzel 4y agoI still think the debate over renaming that token had the wrong premise. It's not like “Expected T_STRING” is helpful either (yes that's real, no it's not a string literal). Token names are never user-friendly and shouldn't be user-facing, they should be an implementation detail.
- beberlei 4y agoTokens are left out of parse errors since PHP 8 released 2 years ago See https://3v4l.org/2T8qQ https://3v4l.org/2T8qQ
- krick 4y agoWeird, I didn't see that trash for so long I thought it was fixed at least in 7.0.
- TazeTSchnitzel 4y agoPHP 7 fully reworked the syntax to be more internally consistent and intuitive, so there's a lot less arbitrary restrictions that cause syntax errors.
- reedf1 4y agoMaybe not a huge issue in itself, but points to a culture that is simply broken. A confluence of issues like this lead to a highly idiosyncratic ecosystem - and hence to the negative view of PHP that many have.
- beberlei 4y agoThis discussion was 13 years ago, the project changed alot since then including its approach to self organization. Tying back to this particular story, parse errors don’t include tokens anymore since PHP 8
- pwdisswordfish9 4y ago
- usrbinbash 4y agoThe thing is, most of the language is anglophone; just as an example here is the reserved keywords list; http://www.nusphere.com/kb/phpmanual/reserved.htm http://www.nusphere.com/kb/phpmanual/reserved.htm the string functions; https://www.w3schools.com/php/php_ref_string.asp https://www.w3schools.com/php/php_ref_string.asp the JSON functions and constants; https://www.w3schools.com/php/php_ref_json.asp https://www.w3schools.com/php/php_ref_json.asp
- 2143 4y ago> Why should this be changed? Is it broken? Is it something that 1 second on google can’t answer? Pretty sure every year there's thousands of unnecessary search requests for this nonsense. Programming languages are tools. Make it as easy and straightforward as possible so that its users can build whatever it is they were building with the least amount of friction. > There are two reasons this term will stay. It is a tip of the hat to the amount of PHP work that came out of Israel Funny because PHP — particularly theearlier versions — isn't exactly considered an example of good language design (though it has vastly improved recently). > but you google it once in your life and then you ‘forget’ about it. Negative. I had forgotten what it meant. All I remembered was that I've seen it years ago and was annoyed back then. > And if you can’t remember the meaning of something like that, I hardly doubt you’d be a decent programmer anyway. That's just, wrong on so many levels. Anyway, I'm just happy they didn't say anything like "people who screw up colons shouldn't be coding"
- akiselev 4y ago> "people who screw up colons shouldn't be coding" If you can’t get something as simple as a colonoscopy right, you shouldn’t be anywhere near a terminal.
- porker 4y ago> And if you can’t remember the meaning of something like that, I hardly doubt you’d be a decent programmer anyway. Ah, the elitest assholery that made PHP a wonderful place to be /s
- skrebbel 4y agoIf seen PHP called a lot of things but “elitist” is new to me.
- 9dev 4y agoRead through old-ish posts on their maintainer mailing lists. There’s so much snobbery, elitism, and straight-out hostility to anyone from the outside, it reads like 8chan. This has changed by now, but the PHP maintainer community before version 7 was a circle jerk of hyper anal trolls.
- dang 4y agoRelated: If it aint broke don't fix it. A PHP (horror) story - https://news.ycombinator.com/item?id=9485570 https://news.ycombinator.com/item?id=9485570 - May 2015 (7 comments) PHP expects T_PAAMAYIM_NEKUDOTAYIM - https://news.ycombinator.com/item?id=8196690 https://news.ycombinator.com/item?id=8196690 - Aug 2014 (1 comment) T_PAAMAYIM_NEKUDOTAYIM vs. Sanity - https://news.ycombinator.com/item?id=6356501 https://news.ycombinator.com/item?id=6356501 - Sept 2013 (2 comments)
- josh_fyi 4y agoAs a Hebrew speaker, I have to say that even though one should stick to English in code, paamayim nekudotayim was probably used because it rhymes; it has rhythm; it sounds like nothing you would say in ordinary circumstances.
- usrbinbash 4y agoThere are a lot of words in French or Japanese that rhyme with keywords or English variable names in the projects I am working on. But I don't think my PO would be very happy if someone called him at 3 'o clock asking what the hell that line in the logs means.
- buro9 4y agoPlease check back later Error 1027 This website has been temporarily rate limited You cannot access this site because the owner has reached their plan limits. Check back later once traffic has gone down. If you are owner of this website, prevent this from happening again by upgrading your plan on the Cloudflare Workers dashboard.
- mannerheim 4y agoIt isn't even spelled correctly. The romanisation should be nekudatayim: https://en.wiktionary.org/wiki/%D7%A0%D7%A7%D7%95%D7%93%D7%AA%D7%99%D7%99%D7%9D https://en.wiktionary.org/wiki/%D7%A0%D7%A7%D7%95%D7%93%D7%A...
- pwdisswordfish9 4y agoBy whose authority?
- Jiro 4y agoThe world's. There are not an unlimited number of acceptable methods for romanizing Hebrew.
- compsciphd 4y agothe Israeli standard way of romanizing hebrew looks weird to any person whose first language is english. take the Israel city of Petach Tikvah. Assuming you know about the gutural h in hebrew, you know how to pronounce it correctly via that spelling. However, that's not the official transliteration. The official one is Petah Tiqwa. And unless you know that the w should be pronounced like a v, most israelis (perhaps not those of yemenite extraction) will look at you strangely. why transliterated weirdly? my understanding is that its meant to be able to go 1:1 programmatically back and forth between hebrew and english, so you end up with things that look weird to the english trained eye.
- latte 4y agoBy who's authority should the word "who's" be spelled "whose" and not "who's"? In all seriousness, it's interesting to see how the live language is diverging from the rules. The dual ending "-ayim" is supposed to be used with the singular stem: nekuda(-t) - giving nekudatayim "two dots", and likewise shnatayim "two years", dakatayim "two minutes", etc. But in practice, speakers classify dual as plural and use the form with both plural and dual endings: nekudotayim, dakotayim
- 4y ago
- deleted 4y ago[deleted]
- Gordonjcp 4y agoUnix culture is full of jokes. Why is "T_PAAMAYIM_NEKUDOTAYIM" any less valid than "Printer is on fire"?
- usrbinbash 4y agoBecause Unix jokes don't make something that should be easy needlessly hard. If a double-colon is missing, then the error message should state that, in the language that 99.9% of the language is written in.
- Gordonjcp 4y agoHow exactly is it needlessly hard? You're going to google what the error message says anyway. Maybe if it's something silly, it'll stick better.
- usrbinbash 4y ago> You're going to google what the error message says anyway If an error message says: syntax error: unexpected {, expecting ) ...I don't have to google anything. I know that there is a '{' that shouldn't be there, or that something else is missing before it, done. If the error message would instead read: syntax error: unexpected NAMIKAKKO, expecting MARUKAKKO ...then I would indeed have to google it, unless I just so happened to know the japanese words for "wave bracket" and "round bracket" My point is: a good message about an error as simple as an unexpected or missing syntactical element can convey all the information I need to fix the problem, without requiring me to invoke a supremely powerful search engine, indexing the largest repository of collective human knowledge in existence, to make sense of it.
- dale_glass 4y agoAs far as I know, the "on fire" joke originated in purely professional environments of the 50s or so, and got added to Linux in the early days when nobody but the most hardcore nerds used it. An obscure in-joke makes sense when the system is used by the dozen people that will get it. It quickly starts being annoying when you go mainstream.
- amcsi 4y agoI remember getting that error in the past, and at the time googling for that token gave few results, so it was a slightly bigger deal than you would think. 99% of the time the cause was: you are on PHP 5.2, but we're trying to use PHP 5.3 late static binding ( `static::someMethod()` ).
- Jiro 4y agoI'm reminded of the arguments why GNU will never call GIMP by a friendlier name.
- jrockway 4y agoLike 20 years ago I sent the PHP folks a patch to make yacc generate errors in verbose mode or something, which causes the error message explain exactly what you need to do to fix this. It didn't get applied. (Someone should also look at my PR for golang.org/x/net/trace from like 5 years ago.)
- gpvos 4y agohttps://archive.ph/ACL9Q https://archive.ph/ACL9Q
- ericpp 4y agoPHP 8 does exactly what he suggested and omits the token name: Parse error: syntax error, unexpected token "::" https://3v4l.org/2T8qQ https://3v4l.org/2T8qQ