Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Some good, some bad (Score 1) 427

I'm sorry, but unwrapping the Optional class is simply better than directly checking for null result. People forget to null check and not null checking will cause the program to crash. It is more difficult to forget to None check on a Optional class. The Optional class is a type that's caught by the compiler at compile time. Null checking can only be caught at runtime. Missing if (variable != null) statements don't get noticed by the compiler. Being forced to unpack the result is what you need to do everytime you deal with nullable values and most developers are going to forget null checking once in a while. The Optional class also gives a better meaning to element searching as both primitives and objects can be wrapped in the optional class. Searching an array of primitives for a found result previous to Optional would require a default value to be passed when nothing is found matching the search predicate It's nonsensical. Searching an array of primitives with an Optional construct defined let's the API return None, which has better meaning for elements not found.

Comment Re:Scrum Was Never Alive (Score 2) 371

I want to also add that even though scrum says that the scrum leader should be rotated, the project manager always tends to insert himself into the scrum leadership role (because, they wouldn't have a role otherwise). So rather than the scrum team being a team of purely developers leading developers, we have the programmers leadership abilities suppressed just so that the project manager can be visible as a leader/

Comment Re: basic health insurance for all is needed maybe (Score 1) 177

Please have some evidence citing your claims. As is, the socialist health care systems save their citizens more money than American's private health insurance system. The bureaucracy for payment collection is eliminated under the socialized health care systems. And a nation's military funding has no bearing on their health care funding. American's still pay more of their GDP in health care costs compared to Canadians and Europeans.

Comment Re:Wait, what? (Score 1) 361

Monsanto goes after farmers who use Round Up Ready on their farm fields, not farmers who grow the Monsanto seed. Farmers are free to use any other pesticide on their crops and Round Up Ready would work against non-Monsanto crops. Only when both Monsanto seed and Round Up Ready are used is there a clear case of willful patent violation.

Comment Re:Because no one else does (Score 1) 260

With lambda functions, my lines of code is shorter. I'm write now having to debug my predecessor's code and he wasn't aware of lambdas in C#. Everything becomes a jump point into another awkward function with the intent obfuscated. Rather than just using Linq and Expression trees, he made his own collection classes with tailored search functions on each function. Not every function needs a name and the intent can be inferred by just reading the function definition from the body of the function.

Comment Re:The learning new trends is big (Score 1) 370

I can understand that too. I'm delegating tasks to a person 20 years older than me (I'm 31) and with 16 years more experience than my 4 years of experience. I asked him to write a program that connects to a database directly and he's never had that experience. He said he had several years of experience in VB.NET and he could adapt to other programming languages, but he's struggling with C# and I know he didn't try learning the modern features of VB.NET, like using generics. He has difficulty using search engines to solve common program mistakes, and I've suggested that Google should be his first resort to solving problems rather than I being his first resort. He was fired from his previous job and he's already asking for training on programming. My supervisor is aware of the situation and is growing concerned about his performance. It's basically the end of the line for him in the programming world if he gets fired from my current employer.

Comment Re:pointless (Score 1) 434

Need to fix some things because of the use of brackets You only have generics of the first kind in C#, so implemented things like monad transformers become difficult. A higher order generic can box an inner generic. Say if you had something like with the higher order generic boxing in the inner generic. That's not possible in C# and in F#. new Foo<G, A> { G<A> member = new G<A>(); } A more concrete example of a .NET class that would be G : System.Collection.Generics.List such that G<A> : System.Collection.Generics.List<A>. But you can't pass G around freely and then box it in later. You can only have G an instance of A so new Foo<System.Collections.Generics.List, A> { System.Collections.Generics.List<A> member = new System.Collections.Generics.List<A>() } is not possible.

Comment Re:pointless (Score 1) 434

Well, to be fair, generics are also poorly implemented in C#. If scala can use higher order generics like Haskell can, there's no reason why C# and Java shouldn't be able to.

I'm curious. C# avoided the stupid type-erasure mistake (one that has come back to bite Java, *especially* during the Lambda-J discussions). C# has define-site variance as opposed to use-site variance. What exactly is your problem with C# generics?

You only have generics of the first kind in C#, so implemented things like monad transformers become difficult. A higher order generic can box an inner generic. Say if you had something like with the higher order generic boxing in the inner generic. That's not possible in C# and in F#. new Foo { G member = new G(); } A more concrete example of a .NET class that would be G : System.Collection.Generics.List such that G : System.Collection.Generics.List. But you can't pass G around freely and then box it in later. You can only have G an instance of A so new Foo { System.Collections.Generics.List member = new System.Collections.Generics.List() } is not possible.

Slashdot Top Deals

I've noticed several design suggestions in your code.

Working...