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

 



Forgot your password?
typodupeerror
Compare cell phone plans using Wirefly's innovative plan comparison tool ×

Comment Re:Lambda's plug poor OOP language design (Score 1) 380

Side note:

Ofc in the way how a button right now is implemented the inherited fields like title etc. are likely private and you need to call a setter ...

Some OOP languages allow one to call "set" behind the scenes using assignment notation. I personally find that a nice syntactic shortcut feature, especially for testing-stubs.

Comment For even more fun, put a "Try Again" button (Score 1) 79

beneath the "access denied" and watch a few of them try for 10 minutes straight to load it by clicking again and again, then leave it open and tap it once or twice a day for two weeks before giving up.

I know a couple people like this. You ask, "But what if the link is malware?" and they respond with "But what if it's something great?"

On a similar note, I once sent a bad link by accident to a person who was in college at the time. I then sent a follow up email saying, "Sorry, bad link. Try this one."

They then called me an hour later to say that they kept trying the first link I'd sent, but couldn't get it to load, and asked if there was anything I could do to help. I said, "But I thought I mentioned—that was a broken link, it doesn't work. I sent the right one!" And they responded with a variation on the above—"I know, but you never know, maybe I'd like it! I'd at least like to see it!"

Comment Re:Decimal Numbers? (Score 1) 380

To avoid getting errors in the magnitude of 1e-15 on these inputs (which they could often entirely avoid anyway by working in cents), they instead happily round intermediate results to quantized values with errors typically in the range of 1e-2 to 1e-9 over and over again.

As the saying goes: "Accountants know the cost of everything and the value of nothing".

Comment Re:Lambda's plug poor OOP language design (Score 1) 380

I don't know why you are talking about chips.

They are orthogonal concepts and you can only very badly mimic lamdas with OO concepts and the opposite not at all ... Again: you clearly show that don't know much about the stuff you are talking about.

Show it, don't claim it. Can you present a use-case to demonstrate such? In other words, provide a practical (real world) example of something that lambda's noticeably improve upon compared to an OOP version of the same thing. (We'll try to ignore language-specific differences/limitations, but that's not always easy.)

Do you really [think] basically all new languages are introducing lamdas/closures like mad if they simply could 'improve' OO?

I do believe functional programming is in "fad mode" right now. Language designers are all me-too-ing.

Further, overhauling an OO model in existing languages without breaking existing apps may be harder than tacking on lambdas.

Comment Re:Could you gush a little more? (Score 1) 380

I believe the poster's comment was about the language itself and not code written in the language. You seem to be comparing Java coders to C# coders.

Microsoft did have existing Java implementations and code bases to learn from when designing C#, and by many accounts learned from Java's rough edges to incorporate the lessons into C#.

Comment Re:Lambda's plug poor OOP language design (Score 1) 380

I couldn't get it to do it smoothly, but if it can somehow be done, that's great, and emphasizes my original point that you don't need lambdas to associate actions with objects.

I'm not a Java expert by any stretch and didn't claim be. (I don't use it at work.) BUT, my original point is more about lambdas than Java.

Comment Re:Lambda's plug poor OOP language design (Score 1) 380

But if you could attach your own OnClick method to the button, only one method can be called when the user click on the button, which would be a huge problem for many gui objects.

Put the calls to the other ones in that method. Treat it as a stub method.

And I am not against a "listener registry" or whatever one wants to call it, it's just that a dev shouldn't have to deal directly with it for the vast majority of typical UI coding. Have a convenient front-door for the vast majority of "customers", and a back-door for specialized fiddling. You could stuff a hundred additional on-click events for that button into the listener registry if you wanted. A default on-click method doesn't prevent that. (Hopefully there is a priority code to control order of handling.)

Also, one could put a general event handler on the button's container, and do the other handlers that way, using reflection or environment info to know what widget and what action triggered it.

There are many options without having to deal with lambda's. Would you like to present a specific use-case to explore further?

(I've been trying to invent/define a table-oriented GUI engine that is mostly language-neutral. Most events can be handled using tablized attributes instead of imperatively coded behavior. Everyone's just used to hand-coded behavior out of industry habit. It's poor tool/labor factoring to re-invent a GUI engine for every different programming language. A good language-neutral GUI engine could be attached to any language.)

Slashdot Top Deals

The trouble with being punctual is that people think you have nothing more important to do.

Working...