Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

As stated in my sibling[0] to your comment, the developer may have limited ability to fix it, since its a preference the system will often override. That said, its literally a one line change to implement it (for each view controller class), so there is little reason for them not to put it in, even with its limited effectiveness.

[0] https://news.ycombinator.com/item?id=33781895



sort by: page size:

> reading https://news.ycombinator.com/item?id=35133241, the plan is to change that. I fear that, by the time they get around to that, lots of code will handle the cases null and Optional containing null differently, making that a breaking change

The post your link links to explains exactly how they intend to avoid this problem.


Actually, https://news.ycombinator.com/item?id=30588362 has convinced me this wouldn't necessarily solve the bug in question either, since it's a bug caused by (quite legitimately) re-using an existing value. Though it would be easy to implement a "free" operation by just writing `undefined`, so it would still help quite a bit, and more than suggestions like "just use an Optional/Maybe type".

Preprocessor directives are not powerful enough [0], imho.

[0] https://news.ycombinator.com/item?id=16197856


I really appreciate you taking the time to look into this! I don't have much more to say right now than what I said to this person: https://news.ycombinator.com/item?id=30742704. I need to dig into it and see. What you've written will help. I might introduce unit tests (with visuals) for this so I can sure it works in a lot of different scenarios.

This Equals behavior seems terribly unintuitive as well: https://swiftui-lab.com/equatableview/

When an object contains plain data, the equals interface is not used. That would so rough to debug the first time.


https://goplay.tools/snippet/am2vcq5JYFr

This is an example I made. Can you show how that would change to cause the problem you're describing?


Not every code you deal with is your own.

Besides, terseness is one issue, but far from the only one: https://news.ycombinator.com/item?id=20978608


It is a solved problem, but your compiler does not in fact implement an adequate solution with that mechanism.

* https://news.ycombinator.com/item?id=15044438

* https://news.ycombinator.com/item?id=15060146


Try reading Refactoring UI[0]. The way they explain small things that can make a difference in UI is commendable.

[0]https://refactoringui.com/


I hear this concern a lot, but I’ve never actually seen it happen any more than it does in languages without macros.

https://news.ycombinator.com/item?id=31520381


similar problem with intellij: https://news.ycombinator.com/item?id=12292148

This seems to also impact Java and TeaVM, see this post:

https://groups.google.com/g/teavm/c/gpy0JoKYqbU


Did you read the source code: https://github.com/goktugyil/EZSwiftExtensions/blob/master/S... I don't see the problem?

I'm not sure if it's fair to give it buggy code, but I just changed set(b) to set(d) in the example, and it doesn't realise there's a problem: https://whatdoesthiscodedo.com/g/517c50a

Engineers like to spend time tinkering with things and some of them consequently devalue convenience.

For example:

https://news.ycombinator.com/item?id=29043420


Added support for tags too.

Example for "coding": https://www.learngpt.com/prompts/tagged/coding



Maybe because of this? http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone

I didn't actually check the project source, so I could be wrong.


It's not making any claims about the quality of design in JS here. I'm literally not talking about them in the same sentence for this reason. I'm, instead, merely noting that it had the same issue. Looks like it was fixed in 2014: https://nullprogram.com/blog/2014/06/06/ C# also had the same issue, as noted elsewhere in the comments.
next

Legal | privacy