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:It's not that I want to brag I'm old... (Score 1) 246

Add to that, the defining feature of a functional language is the set of things that it disallows, not the set of things that it permits. A multi-paradigm language, by definition, has to permit anything that the various paradigms permit and so doesn't gain the benefits that you get from being able to reason about your code in a language that doesn't permit unconstrained mutability or side effects.

Comment Writing, technical and otherwise (Score 1) 372

Wow, you wrote that entire rant over a single letter. That's pathetic.

Language is an art, like painting. Technical language is an art where miscommunication leads to real world problems, and where evidence of lack of expertise leads to well justified lack of confidence up front.

With language, as with painting, you can paint like a master, or you can finger-paint like an addled child.

Which do you think will carry you further in life and in your career? Which do you think will result in more actual pathos?

Comment structs and fundamental OO (Score 2) 248

Just having higher-order functions doesn't make a language a functional language any more than having structs makes C an object-oriented language.

Structs do, however, make the critical aspects of an object oriented approach practical in c. They can carry data, function pointers, etc., and they can be passed around.

I've been writing my c code like that since the 1980's. There are significant benefits.

Comment Hard stuff is, in fact, hard (Score 2) 248

I would add to this that reducing the complexity by turning everything into separate functions tends to also increase what I call "opacity by non-locality."

Not only are some things hard, some things benefit from having the logic right there in front of your face; not in a header, not in some function elsewhere, not in a library.

Benefits in both comprehension, and so ease of construction, but also in execution time and smaller executables depending on just how smart the language is in constructing its own executables.

Comment Re:It depends on the use (Score 1) 248

Yes. I think it counters the "functional programming is too hard to learn for most people" argument fairly well. It shows an example of a functional programming language that lots of low skill developers (i.e. general office workers) use quite comfortably. There are of course more interesting functional languages but because they are more interesting they require more learning.

Comment function dictionaries in Python (Score 1) 248

So, for example, by storing functions as values in a dict you can build complex structures of execution without using any conditional codes .

This is the core mechanism of my text markup language. Once the specific built-in tokens are parsed out, they are immediately accessed via the language's function dictionary. This approach is quick, ultimately low-complexity, trivially extensible, and highly maintainable.

Comment Fluid type manipulation with unions (Score 1) 248

Would you consider unions in c a "means to circumvent the type system" as compared to a language with strong up-front typing?

Unions are certainly a very powerful, useful, and concise tool for manipulating data across type boundaries. If you don't have them, in trying to accomplish similar tasks as those unions make easy, in many languages you're going to be a lot more verbose, and likely a lot less efficient, than if you do.

I am assuming competence. Strong typing is a safety net. The need for such a thing varies with one's skill set. The fewer the participants, the more likely it is that the skill sets can be arranged to be similar. With larger teams, the need for safety nets almost always increases.

Comment Poorly understood? (Score 2) 248

If you're using poor coders to maintain very old code then perhaps the choice of programming style is not your biggest problem.

You may have misunderstood the previous poster's use of "poor coder."

I read it as "unfortunate coder", not "incompetent coder."

I could certainly be wrong. Perhaps clarification will be forthcoming.

Comment Re:It has its uses (Score 2) 248

This needs moderating up. Talk to an Ocaml programmer and a Haskell programmer about what makes a functional language and you'll see very different opinions and these two are languages that were actually designed as functional languages: the bits that end up in other languages are a tiny subset.

Coming from the Haskell side, I see functional programming as programming without side effects and with monads. You can implement monadic constructs in other languages, but it rarely makes code cleaner. Just having higher-order functions doesn't make a language a functional language any more than having structs makes C an object-oriented language.

If the question is 'do you think using higher-order functions simplifies the expression of some algorithms' then the answer is obviously 'yes': programmers have a lot of tools to choose from and most of them are useful at least some of the time.

Comment Re:It has its uses (Score 2) 248

In C++14 in particular, lambdas with auto parameters dramatically reduce copy-and-paste coding. If you have a couple of lines of code that's repeated, it isn't worth factoring it out into a separate templated function (in particular, you'll often need to pass so many arguments that you'll end up with more code at the end), but pulling it into a lambda that binds everything by reference and has auto-typed parameters can reduce the amount of source code, while generating the same object code (the lambda will be inlined at all call sites).

Slashdot Top Deals

No skis take rocks like rental skis!

Working...