Better HN
topnewbestaskshowjobs
Log inSign up

randomdata

8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions

Submissions

comment 3y ago · link · parent

In theory, you are only reaching for the 'Objective' parts of Objective-C when your code actually benefits from being object oriented (in the Kay sense). Otherwise you can stick to pure C.

Of course, C has a lot of ugly traps which makes it less than ideal for this domain. This hypothetical subset language addresses those issues. While, again, you would only reach for the 'Objective' parts when your code benefits from being object oriented.

It is true that the inherit dynamism of message passing makes static analysis impossible to cover all cases, but as with all things in life there are tradeoffs. You lose the nice aspects of object oriented systems if you do not allow for that, and OO is particularly well suited to UI code.

Of course, Swift abandoned the object oriented model completely. Which is fine. But Objective-C showed that you can have your cake an eat it too, offering OO where appropriate, and a non-OO language for everything else.

Objective-C's downfall was really just in that C didn't age well – which, among other things, I am sure contributed to seeing the use of the 'Objective' bits where they weren't really appropriate.

comment 3y ago · link · parent

How is that any different from exception handlers, which are so-named because they are for carrying exceptions, not errors?

Maybe you're leaving out the stack trace that one usually expects when propagating exceptions? I'm not sure that is meaningfully different, though.

comment 3y ago · link · parent

I would love to have the original question answered. Perhaps you (or the people who have contributed the code of which you speak) have stumbled upon some solution to the coupling problem, in which case I would then understand the choice.

Frankly, the entire Go community is no doubt keen to hear it. The 'try' proposal fell apart because nobody could figure out a good solution to that problem at the time, and could not find justification for a whole new feature for rare occasions. If `if err != nil { return nil, err }` were to actually become tenable in most cases then said proposal could be revived based on your information. It was otherwise well received.

comment 3y ago · link · parent

Most codebases would not justify the use of 'return nil, err' at all. The language certainly isn't going to stop you, but you are going to make life miserable for future developers if you do so.

There are rare circumstances where it is the right thing, but if you are seeing more than one or two instances in a substantial codebase, something isn't right. If it is a common occurrence, and you are not purposefully trying to demonstrate your hatred of future developers, you've no doubt introduced way too much unnecessary complexity – which too is going to make life miserable for future developers.

comment 3y ago · link · parent

> Panics : Weird because golang already had errors.

It is true that panic allows any value to propagate, so technically you can use it to carry errors, along with anything else you can imagine (names, email addresses, audio, whatever).

But the intent is for it to be used for communicating exceptions. You will notice panic's behaviour mirrors exception handling systems found in some other popular languages. But errors, along with names and email addresses for that matter, are decidedly not exceptional.

comment 3y ago · link · parent

> it's impossible to tell whether someone forgot to check an error

How, exactly, does one find themselves in a situation where they forget to add entire blocks of logic to their application and not notice? We're not exactly talking about subtle bugs here. This is completely missing functionality – something that becomes immediately obvious as soon as testing begins.

Which, I guess, means that the previous developer did no testing at all. In which case, where do you even begin to figure out what else they have forgotten? Such a codebase, no matter the language, may not even be salvageable at that point.

comment 3y ago · link · parent

> Just add try/catch already.

Although the keywords panic and recover were chosen instead, this functionality has existed since day one.

But we're talking about errors here, not exceptions. They are very different things.

comment 3y ago · link · parent

> approximately 3/4 of the significant lines of code are endless repetitions of: if err { return nil, err }

3/4? How are you managing to have so many cases of blindly passing an error up the stack without introducing problematic coupling?

I would suggest that if you are able to realistically do this more than a couple of times total in an application, you have introduced way too much pointless indirection and should take a closer look at your overall design. Something is amiss.

And that goes for any language – not something exclusive to Go. Blindly propagating an error up the stack using exception handlers, for example, is prone to the same problematic coupling and indicates the same design problems if seen in more than rare situations.

comment 3y ago · link · parent

Swift is an improvement over C for the problem domain. Something akin to Swift as a modern C replacement with keeping of the 'Objective' bits of Objective-C layered on top of it would have made for the ultimate language, though.

comment 3y ago · link · parent

I always thought the square brackets were clever. Like wrapping a letter in an envelope – which is a great metaphor for the message sending the syntax denotes.

comment 3y ago · link · parent

> downvoting is not a disagree button.

It's not anything other than a "something pressed a button" button. Offering nothing more than a poor man's analytics system, at best. No additional information can be obtained from it. But, that is still good information, as it tells that there is activity in the vicinity of the comment, which is why one comes here to post and not instead write in their private journal.

comment 3y ago · link · parent

Is it not likely that those most vested in unionization, particularly those who want to take on greater union roles, are those who already recognize that their job is in a more precarious position?

If you recognize yourself as an important player in the organization, with a strong individual bargaining position, it seems likely that unionization would be seen as less pressing. Such a person may be willing to join a union in effect, but doesn't have the same kind of incentive to make a union happen.

It is certainly not surprising that the more precarious jobs are the first to go.

comment 3y ago · link · parent

That is quite different. ? in Rust signifies "this code is not important"

Which even in systems is unavoidable, to be fair. Sometimes failure just isn't important. The division between systems and scripts is not perfect. But, that will be the uncommon case in systems. It is not certain that really needs a symbol in which to draw attention. (An implementation may need a symbol, but that's beyond this discussion)

comment 3y ago · link · parent

Yes, taxation is a core part of being a libertarian. Generally, libertarians believe in taxation only for essential government services, but policing is definitely considered essential to libertarians. It is central to the ideology.

Colloquially, anarcho-capitalism is sometimes also referred to as libertarianism. Those who subscribe to anarcho-capitalism believe in stateless societies, of which taxation would be incompatible. However, Thiel purports to be a libertarian in the stricter sense. This usage is not applicable here.

comment 3y ago · link · parent

Libertarians stand firm behind the rule of law, and a “free market” solution to help with that is in line with such values.

comment 3y ago · link · parent

It was suggested that neither Go nor Python would be chosen if language features are what you are after. Pointing out that both lack a certain feature only reiterates why one would not chose either of them.

comment 3y ago · link · parent

Go's exception handling (panic/recover) is very much like most other languages with exception handling, including Python. It is there to use when you have exceptions.

But we're talking about expected failure (network failure, hardware failure, etc.), not exceptional cases (programmer error). You would not want to carry 'expecteds' on exception handlers. Different tools for different jobs.

That said, systems transcend Go. The discussion isn't about Go, or Python, specifically.

comment 3y ago · link · parent

> but the larger purpose of the code is obscured in all the "if err != nil" weeds.

That's the difference between script and system programming. When writing scripts, one is only concerned about carrying out a certain task and if anything goes wrong the whole thing can bail. Systems are more robust. When things go wrong they cannot just fail. They need to recover gracefully and do something meaningful in the failed state.

Handing failure conditions is the primary purpose of system code. Irrespective of Go, there is something to be said about some kind of identifier that says "take note: this is the most important code in the application!" If that comes across as being 'weedy', you know that you really needed a scripting language, not a systems language.

Different tools for different jobs.

comment 3y ago · link · parent

He asserted a society, not necessarily a rule of law. Law formalizes a direction for society, but society can also function in a more ad-hoc manner. If an individual does not have any meaningful kind of society behind him, however, defending tens of thousands of acres like a farmer in a society can is likely impossible.

comment 3y ago · link · parent

In fairness, if you are choosing a language based on language features, you are not going to choose Python either.

comment 3y ago · link · parent

> Are we limiting the output somehow?

He is saying that we limit his inputs. He wants to, for example, be able to produce his own food as to not have to rely on deals made with other people to acquire food, but notes that society carefully controls who has control of the land that is able to support that production, leaving nowhere for him to do so, and leaving him at the mercy of being able to reach agreements with others – others who may not want to make an agreement with him – in order to eat.

He says that without a strong society he could push anyone standing in his way of the land aside (by brutal force, if necessary), but an entire society standing in his way is a force too great. As such, he believes that great force should provide suitable compensation for the restrictions it imposes (e.g. if you aren't permitted access to land to produce your own food, you should be guaranteed access to food by some other means).

comment 3y ago · link · parent

> when clearly oligopoly is the end game of unconstrained capitalism.

The trouble (or benefit) of unconstrained capitalism is that as soon as you do anything compelling, a thousand people will jump in to copy you. This makes establishment of an oligopoly highly unlikely.

We see oligopolies in our constrained environment because the artificial constraints (e.g. intellectual property laws) we apply help build 'moats', keeping those thousands away.

comment 3y ago · link · parent

Grocery stores are already operating at rock bottom – in most markets, at least.

It is not that difficult to try opening your own grocery store. In fact, many restaurants did exactly that during COVID-19 shutdowns. Realistically, succeeding is going to be nigh impossible, though, as there is not much you can compete on. You are not going to be able to sell the product for less.

It is not meaningfully bound by a regulatory barrier, but it is limited by there being no further room for competitiveness, as also spoken to in the previous comment.

comment 3y ago · link · parent

High profit doesn't necessarily mean the players aren't at rock bottom. Some industries need high profits to justify the effort. If all you can eek out is a small profit, you can do just about anything else.

But, assuming there is room to go lower, then the market isn't yet competitive and has room for someone to swoop in and take the spoils. If there is some regulatory barrier that is preventing that, then there was no illusions of it being competitive in the first place.

comment 3y ago · link · parent

> Tech geeks tend to assume everybody wants to live in anarchy.

The tone I get here is that tech geeks assume we want to live in a civil society, where one can plead their case and see Apple unlock the device when one has shown they have legal ownership and possession of it.

But, if the story is telling the whole story, anarchy is what we are living in. Apple just goes off and does its own thing without recourse.

comment 3y ago · link · parent

Which `ls`?

comment 3y ago · link · parent

> I aim to filter out trolling, derision, meaningless joking, repetition games, and uncharitable interpretation.

Your dedication to blocking every account you come across is admirable, at least.

comment 3y ago · link · parent

> I never admitted any bad faith because I never argued in bad faith.

Not so. You clearly stated that you were focused on my supposed "mania". That is an admission of bad faith. You know full well that even if it were true, it has no relevance to anything in this thread and is a fallacious diversion.

> you immediately assumed the worst of the person

I assumed nothing about the person until the person stated that he wanted to change the subject to talk about me. A random topic change is in bad faith, ad hominem is in bad faith, and bringing feelings to a discussion is in bad faith.

> I will not engage in this discussion any further.

Are you under the impression that this is a train station? You do not need to announce your departure. Logically, we understand you have stopped participating in the discussion when you stop participation in the discussion. This is another bad faith device.

Do better.

comment 3y ago · link · parent

> Could it be that he applied his own experience, and experience of other languages and came up with the list as the result?

It is almost certain. I said that in the first comment and every single one that followed.

> I mean, you've now spent several comments and the last comment exclusively talking about Objective J.

I repeated the same thing several times because what I said was not understood by the recipient. Communication can be difficult and a different phrasing helps people here in good faith to understand what wasn't clear on an earlier attempt. As Objective-J was present the first time, it was necessary to include every time, else the message would have changed.

While you got the benefit of the doubt, with you now admitting that you are here in bad faith, what did you hope to gain from that?

1
969798
256