LWN.net Logo

This is why Haskell is so great...

This is why Haskell is so great...

Posted Aug 3, 2006 20:16 UTC (Thu) by dlang (✭ supporter ✭, #313)
In reply to: This is why Haskell is so great... by droundy
Parent article: Quote of the week

a data structure should be independant of the language used to access it.

it may be convienient when describing a datastructure to refer to elements by type definitions from a particular language (assuming it's widely known), but that's just shorthand.


(Log in to post comments)

This is why Haskell is so great...

Posted Aug 4, 2006 0:52 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

a data structure should be independant of the language used to access it.

It's not the language used to access the data structure -- that's the code, which we're all saying is not the most important part of a program. It's the language used to describe the data structure.

it may be convienient when describing a datastructure to refer to elements by type definitions from a particular language (assuming it's widely known), but that's just shorthand.

The convenience of expressing the definition of a data structure in a language is everything -- it's what determines whether it's hard or easy to write the program, hard or easy to read it, and how likely the program is to be correct.

In assembler, you can completely describe your data structures in English comments (and you should). A high level language lets you express some of that in language elements, which a machine (the compiler) can understand. The more you can express that way, the higher level the language.

The ideal of a declarative programming language is that you do nothing but describe the data structures, and the compiler generates a program that computes the information you described.

I've never seen Haskell, but it sounds good.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds