Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Re:Poor life decisions (Score 1) 344

You cite all these oppressive taxes, and yet, people keep moving there, and getting rich.

Somehow, your world view that taxes are oppressive, and counter to being able to better yourself; and the reality that California is the home to many people who are being incredibly successful need to end up unified, and I'm struggling to see how.

Instead, could it simply be that said oppressive taxes aren't oppressive at all. Instead, they're supporting education, environment, health, and wealth.

You know... It might turn out that supporting people, and making sure that the group as a whole operates well actually improves conditions more than saying EVERYONE FOR THEMSELVES!

Comment Re:More Vehicle compatbility (Score 1) 177

I kinda doubt the Tesla superchargers suck at what they do.

They do actually - they only support 120kW, compared to the J1772+Combo standard which supports 350kW.

They also have far fewer vehicles with their weird connector on the road, and far fewer charging stations supporting their weird standard.

Comment Re:Okay, but... (Score 1) 177

All the auto-makers *have* adopted the standard. Specifically, everyone other than Tesla has adopted the J1772 + Combo connector.

Importantly, Tesla's connector only supports 120kW charging. J1772+Combo supports up to 350kW.

J1772+Combo accounts for 90% of the charging stations, and 90% of the vehicles. It's Tesla that need to adopt the standard, not everyone else.

Comment Re:It has its uses (Score 1) 408

Currying doesn't violate referential transparency. curry is a function that accepts a multiple argument function, and returns a one argument function. It always returns the same function when it's given the same function as an argument. That's referentially transparent.

The difference isn't about being "full of state" it's about accessing state external to you. Again - if a function relies only on its arguments to determine its result, then it is referentially transparent, aka "purely functional".

Comment Re:It has its uses (Score 1) 408

The one core concept that makes functional programming different from anything else is "referential transparency". Referential Transparency is the property that you can substitute a call to a function with a given set of arguments with the result of that function in the program, and the behavior won't change at all.

To put it another way - when you call a function, its result has to be determined based *only* on the arguments you pass in, not any external state that might be floating about. It's not allowed to go and fetch an instance variable; it's not allowed to poke a singleton and grab state out of it; it's not allowed to print something; and it's not allowed to launch missiles.

What that gives you is:

1) It's very easy to test those functions - you define a set of arguments, you define a correct result, and you say 'call this, and you should get this result'.

2) It's very easy to parallelise these functions - since they're not affecting any outside state, no locking is necessary, you just run them side by side, and you're done.

3) It's very easy to debug these functions, since you have a defined input, and a defined correct output, you can sit there and easily understand what's going on.

4) it's very easy to reason about these functions, since you never read a chunk of code in them and go "god, what could all the values of this external state be?"

5) It makes code clearer, since you can easily document exactly what that bit of code is doing, without any reference to any external parts of the system, or any prerequisites.

Slashdot Top Deals

Optimism is the content of small men in high places. -- F. Scott Fitzgerald, "The Crack Up"

Working...