HNHacker News
TopNewBestAskShowJobs

hota_mazi

2,724 karma · joined May 30, 2016

submissionscomments
hota_mazi··on New language features since Java 8 to 17
Java's supported version on Android is a moot point: all new Android development should be made in Kotlin.
hota_mazi··on New language features since Java 8 to 17
Android is based on the JVM, it will never switch to Flutter (and an aggravating factor is that Dart is an inferior version of Kotlin).
hota_mazi··on New language features since Java 8 to 17
Interestingly, I have the exact opposite opinion.

Scala has been declining steadily for a decade now, and Scala 3 is going to precipitate this state of affairs by splitting the shrinking community even further.

Kotlin, on the other hand, has done nothing but grow for the past five years, no doubt helped by Google's formidable support for it. I just took a quick look at one of its Slack channels, "getting-started", and it has over 38,000 people on it. And that's just one channel among dozens more.

I don't think Java's latest additions are anywhere near threatening Kotlin's rise to dominance since Java is moving at a very slow pace, by design, while Kotlin supports some features and design directions that will never happen in Java.

hota_mazi··on Nim 1.6
I think that by installing vim on all your editors, you are missing out on a lot of productivity.

You are basically giving precedence to text edition over code edition. When you use an IDE, you are editing code, not text, and that IDE's key bindings are optimized for that purpose.

I suggest you take the time to learn native key bindings to whatever tool you picked and see where that gets you, you'll be surprised after a few weeks.

hota_mazi··on Builder Pattern in Rust
I don't know where you pulled that 5 number from but it seems to come out of thin air.

Besides, breaking structures in smaller structures this way can lead to code that's much harder to follow, refactor, and maintain.

hota_mazi··on Builder Pattern in Rust
Yes, I was referring to when you derive the trait, I should have been more specific.

Also, this doesn't help at all for function invocation, which is still very cumbersome in Rust in the absence of default parameters, named parameters, and overloading.

hota_mazi··on Builder Pattern in Rust
It's actually worse than Java in that regard since at least, Java supports overloading.

In Rust, you need to come up with a new function for each combination of parameters you want.

hota_mazi··on Builder Pattern in Rust
Default only assigns parameters to their default value based on their type (e.g. "0" for u8), it's not an actual implementation of actual default parameters.

More details about this and what else is lacking in Rust compared to Kotlin:

https://medium.com/@cedricbeust/what-rust-could-learn-from-k...

hota_mazi··on Nim 1.6
Not sure why you say these are much better when all these surveys pretty much give you the same result, if you look at these rankings in terms of brackets.

Basically, they pretty much all agree which languages are the top 3, top 5, top 10, etc...

hota_mazi··on Nim 1.6
You're both just making the case that you shouldn't use vim to write code.

More modern editors (e.g. VS Code) and modern IDE's (e.g. IDEA, CLion, Visual Studio) make either indenting absolutely trivial.

hota_mazi··on Crystal 1.2.0
It makes running Linux as a primary OS irrelevant.

Linux on the desktop has always been a joke, but it's even more irrelevant now. You run Windows as your main development OS and when you're ready to deploy your app to Linux, you launch WSL or run a CI/CD pipeline.

But there is now zero reason to ever run Linux as the main OS on your desktop.

hota_mazi··on Crystal 1.2.0
You're making a lot of assumptions here, some of which are incorrect in my opinion.

If anything, WSL is making Linux more irrelevant as a development environment, and Windows 11 is going to take this to the next level (take a look at Hanselman's demo video [1]).

Yes, production runs in majority on Linux but development happens massively on Windows. With macOS a distant second and Linux barely used as desktops.

[1] https://www.youtube.com/watch?v=B4VYjxzx2us

hota_mazi··on Go is a terrible language (2020)
It's a pain because it forces users to consider and code against error paths.

Just like putting on a seat belt is a pain.

Both are pains that are worth having because they help you create robust software.

The ways in which a function can fail should absolutely be part of its signature, and if these are recoverable, the compiler should refuse to build until you either handle these errors or pass them on to the caller.

hota_mazi··on Rust: Enums to Wrap Multiple Errors
The only downside of this approach is that you can't pass a dynamic string giving details on the error, but that's because Rust's enums are not powerful enough to express this (as opposed to Kotlin or Java).
hota_mazi··on What Rust could learn from Kotlin
But the recommendation sounds like it's trying to work around a limitation of the language.

"We don't support named parameters, therefore, create an enum whenever a boolean would have been enough with proper support of named parameters".

I think this is unsound reasoning, but regardless of whether you agree with this or not, the idea of creating an enum for every boolean that gets passed to a function sounds pretty crazy to me.

If you have named parameters, you just don't need to create an enum whenever you are passing a boolean to a function.

hota_mazi··on [dead]
The stagnation started well into Jobs' era, right after the iPad.
hota_mazi··on The Science of the Benefits of Religion
That belief is irrational, though, since there is no evidence that such a being exists.
hota_mazi··on The Science of the Benefits of Religion
> I did have an atheist phase, but that depressed me so severely that I almost had no choice but to reconsider my belief.

Would you say then that you think it's more important for you to feel better than to believe true things?

> Without a religious structure, life has no set purpose.

Life has the purpose that you give it, there is no need for religion or deities for it.

I feel empowered by the fact that I give my life the meaning that I want, as opposed to that purpose being imposed on me by some supernatural deity whose existence has never been demonstrated.

And you know what? Even if at some point, the existence of such a deity is demonstrated, I will still choose to give my life my own purpose.

hota_mazi··on The Science of the Benefits of Religion
I am pro choice and against abortion.

I don't like abortion. Nobody likes abortions. Women who feel that they need to get an abortion don't like it either. It's a horrible, traumatic procedure.

But it's a reality that it needs to be legal, regulated, and safe.

It's absolutely critical to civilization that women have a choice to undergo an abortion if they choose to. It's their body, their life, their future. Nobody else's business, especially not the government's.

The government should never require them to carry a pregnancy to term in much the same way that it shouldn't force you to give an organ (and it doesn't).

I am not pro abortion, I am pro choice.

People opposed to abortions are not pro life, they are anti choice.

hota_mazi··on The Science of the Benefits of Religion
We can start by the fact that their political leanings have led most of these states to have the highest COVID 19 death ratios because they don't believe in vaccines, nor science.
hota_mazi··on The Science of the Benefits of Religion
> One can find examples of both religion and secular philosophy promoting irrational thinking

This is whataboutism to an absurd degree.

"Yeah, religion is not perfect, but atheism is not perfect either, so they're both on par".

No, they're not.

> and I don't see any evidence that people who abandon religion automatically become more rational.

They just abandoned an irrational belief, so by definition, they are immediately more rational.

hota_mazi··on The Science of the Benefits of Religion
We do good because it feels good to do good, but also because evolution allowed us to develop empathy.

We feel a natural need to help other people because we hope that other people would help us if we needed it to.

"Today, you. Tomorrow me".

We hold the door to strangers, help them carry stuff, or pick them up they have a flat tire, and none of that requires the existence of a vengeful god who will send us into a lake of eternal fire if we don't comply to his wishes. We help each other because we are a social species.

We do it because most people on this planet are good people who want to be happy and who want people around them to be happy.

Religion and gods are unnecessary for any of this.

hota_mazi··on The Science of the Benefits of Religion
> Who is any person or government to dictate this to me?

Nobody is forcing anyone to attend public school. Send your kids to a private school if you want.

But if you want to benefit from what public schools have to offer, you have to abide by their rules. And one of them is that expression of religion is banned there.

In much the same way that a guest to your house would have to abide by your rules.

hota_mazi··on The Science of the Benefits of Religion
You think that doing good only because you are being watched is a good value to have? IF yes, then please, by all means, continue believing in your god if that's all that keeps you from raping and killing people.

Atheists do good because it's the right thing to do. You seem to do it because you are afraid of getting punished.

hota_mazi··on The Science of the Benefits of Religion
I guess you could say they are intolerant of all religions, but that's a stretch.

The bottom line is that all displays of religion are banned in French schools, which puts everyone on an equal footing. Even religious people should see the value of that, especially if you're part of a minority religion.

Schools are places where you learn, not practice religion. That's what places of worship are for.

hota_mazi··on The Science of the Benefits of Religion
Insulting the president stopped being an offense a while ago:

https://www.theguardian.com/world/2013/jul/25/insulting-fren...

I still don't see the hypocrisy you speak of, though. France is a reasonably religious country overall but extremely secular when it comes to school and politics. The edicts you describe simply enforce these principles (e.g. "No religious symbols allowed in school, be it a cross, a star of David, a hijab, etc...").

hota_mazi··on The Science of the Benefits of Religion
Just because you met a few people with a fragile grasp of complex scientific topics doesn't mean the science is wrong.

Evolution is a fact. It has been demonstrated over and over again, is observable, and has predicative powers.

Religion has none of these things, and your particular religion is well known for being absolutely traumatic for people who follow it and even more so for people who leave it.

hota_mazi··on The Science of the Benefits of Religion
Right on.

I challenge anyone who disagrees to come up with a benefit that religion offers that cannot be offered by a secular organization.

hota_mazi··on Why can’t I go faster than the speed of light?
> From the photon's perspective, it passes earth immediately.

To go even further: to a photon's perspective, it is able to teleport instantly anywhere in the universe, because time doesn't elapse for it.

hota_mazi··on Why can’t I go faster than the speed of light?
> I think a lot of people assume that this means you couldn't go more than a few (~100) light-years in your lifetime... But this is not actually correct

It his, it just depends on the observer.

An external, stationary observer will never see you go further than 100 light years, but yourself? Assuming you are able to make your ship go any arbitrary speed approaching c, you could be traveling billions of light years.

It's just that when you stop (if you manage to stop), the universe around you will have aged billions of years, while you will only be a few years older.

← PreviousPage 8 of 34Next →