Hacker News new | past | comments | ask | show | jobs | submit | nhatbui's comments login

So true, tale as old as time. Someone “raises doubts” based on partial knowledge of the subject, they go back and forth with someone, and then finally someone comes in with conversation-killing “what is consciousness anyways” type comment


I think OP meant discarding public/private constructs entirely, no protection, like in python.


Except python started mangling double underscore in a futile attempt to implement private members/methods.


The underscore prefix is more about communication. It's not a bad convention as it makes you feel a bit dirty when you are using them outside a class, but, do what you want, we are consenting adults.

Whenever I say "I'm no longer attached to all that private stuff", people always reply, "wait until you work on a large code base". I work on a million line+ code base. Whatever.

This argument aside, I'm not a total philistine. RAII is awesome but C++ is full to the boot with crusty stuff to keep the compatibility. I always feel there is a language better than anything trying to come out.


Python will literally mangle the names of double underscore members by prefixing them with the class name, to make it harder to access from the outside, so it is not just about communication.

These days I'm for minimalism, most of my structs are aggregates of public members, but sometimes you really want to make sure to maintain the invariant that your array pointer and your size field are in sync.


Using double underscore is advised against, and the name mangling is largely considered a mis-feature these days. Most style guides will tell you to use a single underscore to mark something as not for public consumption.

Of course neither double nor single underscore will stop anyone who wants to touch your privates badly enough. Which is big part of the python philosophy: You're not stopped from doing inadvisable things. Instead there's a strong culture around writing "pythonic" code, which largely avoids these pitfalls.


And neither does C++'s 'private' stop any other code from messing with your data, either, if they want to do that badly enough.


I'm not super familiar with C++, but I imagine you'd need some chicanery to access privates, while in python you can just use them by name.


Well, you can always cast and access stuff by memory address.


I can't rally upvote this without breaking the rules about obscenities. But I'll give it a :)

In python, if any of this gives you an trouble you can just replace the stuff in the class dict with your own functions. You don't even need to cast.


69th edition would be sacred


Also in microservices land you could have the service doing its business logic but needing to support a server for metrics and/or debugging. Just piling on, this is good to study :)


I would be interested in hearing more about how you deploy. I’m guessing the zip has the application(s) and SQLite is for configuration?


(I couldn’t help but look at your profile) And then what motivated your move from software to law?


I also left engineering for law. Money was a factor when I applied, but also I did not like being pigeon holed in my engineering career. I do patent litigation, so I get to see discovery on the whole system as opposed to portions of it for a variety of technologies (i.e., network security, semiconductors, mechanical devices). I only had about 2 years of engineering experience (working in defense industry), but found the career boring and the pay low (~60k starting vs $160k starting in big law (which is now $205k starting)). Granted, I do think if I went to silicon valley when I graduated, I may have found a better position at a start-up environment. After 10 years of patent litigation, I do find it boring, but at least I am paid well comparatively to my SV engineering friends.


I tried making the original Macintosh OS in Godot and my takeaway was it was really enjoyable to make UIs in a game engine. It would be interesting to see some “avant-garde” movement of making not only games but native apps using game engines.


This isn't quite that, but I can never not link to https://arcan-fe.com/ in cases like this. He even updated today!


I was fairly young when these games came out but could someone confirm with me that the first collage of game screenshots are mirrored backwards? They say [bottom to top, left] but it looks like they have it flipped. Like Wolfenstein 3D (left), Hovertank (right) and Quake (left), Doom (right).


Lots of mistakes in that caption. The games are:

  Top: Return to Castle Wolfenstein (2001)
  Second row, from left: Quake II (1997), Doom (1993)
  Third row: Wolfenstein 3D (1992), Hovertank 3D (1991)
  Bottom: Dangerous Dave In the Haunted Mansion (1991)


Very much this. It doesnt bode well for the credibility of an article posted on IEEE no less, when random 30 something person can spot 2 errors in 5 seconds after loading the page.


I spotted:

  - Bad image order instructions
  - Quake should be Quake II
  - Hovertank should be Hovertank 3D
  - Commander Keen should be Dangerous Dave In the Haunted Mansion


Looks right to me. Right to left, bottom to top is what I read their description as being. One thing wrong is that isn't Quake, but Quake 2 which was released in 1997


Also the bottom image isn't Commander Keen, it's Dangerous Dave.


They do mention that order, kind of. I guess the problem is that right to left, top to bottom is a fairly maniacal order to put things in without a good reason.


Oh that's my mistake. I thought by the description "left", it meant "yes, bottom to top but for each row, read left to right". Thanks!


The entire article has far too many errors. Most of the info is correct but they make several mistakes including lots of typos.


Why does get/set need to see increment? They don't call increment...


The point he is trying to get at is that in an OO language you take it for granted that all methods can call all other methods. However without such trickery as described in the article this is not true in the simple language with only functions.


It depends from what perspective you come at it, though.

The article makes the case that the "simpler language" is the one where a function can only call another function if it has been declared before. Then, the ability to call any function regardless of declaration would be seen as an addition to that.

But couldn't one make an equally valid case that the "simpler language" is the one where function declaration order is not significant, that unordered is "simpler" than ordered? Then, the availability of a "F was declared before G" relation would be seen as the addition.

After all, the only reason we intuitively feel there is an order to function declarations is because the computer program's representation in source code is linear text. But I'd argue that the more fundamental representation of a computer program is that of a graph. Or at least equally fundamental :) It's just that in practice, computer memory is linear, and so any representation of a graph structure will have an implicit order that we need to tell the computer to ignore. But mathematically this ordering is just a side-effect of computer memory, irrelevant just like whether '1' bits weigh more than '0' bits or not.


He meant, imagine if they do.


Why not use an example that actually works?


That paragraph confused me too, but then I realised what he meant, felt the same as you, but still couldn't think of anything on the spot that would work other than:

    set(value) {
        count = 0
        while count != value {
            increment()
        }
    }
(~~may not be~~ probably isn't valid Dart)


That's an infinite recursion, because increment() is going to call back to set()


Heh, true. So, examples are hard. :)


You can diversify and allocate funds to stocks/bonds in a way that suits your risk tolerance and financial goals.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: