Skip to main content
GameDev.net gamedev.net
🔒 Locked

Programming getting too high level?

Started by CProgrammer Jan 9, 2005 at 4:15 AM 14 replies 1.3k views
Original Post
CProgrammer
CProgrammer
Im looking at c# directx and must say its good and I definetely see the benefits over c++ directx. But Im wondering wether the language as most never langueages like java etc are getting too high level. I mean the higher level it is the more you need to memorize. Plus things can get a fair bit cryptic and the language moves from being a tool that you get into quickly(once you know programming) to an assembly kit where you puzzle the pieces together. An example of what I find overkill is that now Managed DirectX has predefined structs for each vertex type. I find it much easier to just define my vertex as a struct. hen all I have o remember is that I have to define one and the flags. The workload is hardly greater.Or the file io system of C# and java where you need 2-3 classes linking to eachother to get started on just reading a file. I mean its good to have these in a library like boost or even standard but why no simple alternative. Another thing is that with lower level languages things where in my opinion more intuituve: You understand how a computer works and you can do loads. Now you must know some class or funcion call in order to get things running. Im just interested in gettin some good reasons for excessive moving to high level languages. I can think of some myself but id like more. 1.) saver management for he OS 2.) more universal code 3.) less development time(although thats relative: adding more libraries to liek c++ does the same, maybe adding some garbage collection to stop debugging time.) -CProgrammer
Fruny
Fruny
Quote:
I mean the higher level it is the more you need to memorize. Plus things can get a fair bit cryptic and the language moves from being a tool that you get into quickly(once you know programming) to an assembly kit where you puzzle the pieces together.


Considering the work involved in implementing those 'pieces' yourself, many see that as a good thing. Additionally, assembling those pieces generally follow consistent rules (if the language and library have been well-defined), which are all you really need to grok.

Compare with ASM opcodes.

Quote:
You understand how a computer works and you can do loads.


Many people don't understand how a computer works. Furthermore, what is good practice on one platform may not be good practice on another... or even simply on a later model of the same family of CPUs.




Maybe you should become a library writer rather than an application writer.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Pipo DeClown
Pipo DeClown
I have to agree with the fact that Java and C# File I/O is too much work. I don't care about type-safety, now give meh xscanf()!!
Fruny
Fruny
Quote:
Original post by Pipo DeClown
I have to agree with the fact that Java and C# File I/O is too much work. I don't care about type-safety, now give meh xscanf()!!


Write it, add it to your personal library, use it.

You only have to do the work once.

And the result is, ironically, even "higher-level", by definition. [grin]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Oluseyi
Oluseyi
Quote:
Original post by CProgrammer
...the higher level it is the more you need to memorize.
Not really. You're forgetting all the special cases in your "lower-level" languages, all the unique warts in the languages and their built in libraries, all the necessary third-party code, and the fact that you end up reimplementing and re-engineering the same things over and over again.

Quote:
An example of what I find overkill is that now Managed DirectX has predefined structs for each vertex type. I find it much easier to just define my vertex as a struct. Then all I have o remember is that I have to define one and the flags. The workload is hardly greater.
Let's see... you have to declare a struct for each vertex type you might use, then define a corresponding FVF... versus just using an enumeration (that's right; the Managed DirectX vertex types are not structs, but enumerations instead).

My suspicion is that you're suffering from Stodgy Old Programmer's Syndrome. You're rather young to be a sufferer, but whatever. What, you ask, is SOPS? It's when a programmer is so used to doing things in a set way that he creates unfair comparisons to a newer, perhaps more efficient use of his time and skill to justify the methods he already knows. It's quite tragic, actually.

Quote:
Or the file io system of C# and java where you need 2-3 classes linking to eachother to get started on just reading a file.
See, that's another example. If you wanted to read a file in a robust manner in C++, you'd find that you had to do quite a bit of work - buffering, memory allocations, etc, etc. Sure, just reading a certain amount in from a file might be straightforward, but try anything even slightly more complex. Language and library design is a matter of balance, pitting the average use case against the extremes, and it's more valuable to support the average well than the extreme.

Incidentally, there are classes in C# and Java to just read from a file as a stream. I guess you're just not familiar with the standard library yet.

Quote:
Another thing is that with lower level languages things were in my opinion more intuituve: You understand how a computer works and you can do loads. Now you must know some class or funcion call in order to get things running.
The way the computer works is very little like the way humans think. Who cares how the computer works? It's more important for languages to provide efficient and effective means for humans to express the ways we think.
CProgrammer
CProgrammer
Those are good points.
Id say what I find most surprising is that in for instance java it is very hard to get away from standard libraries.
In c++ I usually start by writing wrapper classes or even a dll around libraries I use. Hence once thats done I have a environment that is completely made for my project, all objects and calls defined by me or the team. This also gives the benefit of being independent, if all the libraries change no problem just attach new ones.
I found this hard to do in java(possible but a bit of a pain) because many things would only work inside he class inheriting from your desired environment(like applet).
On a sied note: Im no expert in java so maybe Im missing something.

-CProgrammer
Staffan E
Staffan E
I don't really see the problem. I don't believe there are good and bad languages, but rather that all languages have their own specific application. Perhaps a lot of programmers who wants to develop high level software are moving up to the newer high level languages. So what? There will always be a need for lower level programming. That cannot be repalced by high level programming and standard librarys. Someone always has to do the low level work. Does that settle your fears?

---
Staffan Einarsson
Hack my projects! Oh Yeah! Use an SVN client to check them out.BlockStacker
Nice Coder
Nice Coder
if ( equals(Heighlevel), (Programming_language) (   print ("AGHH " programming_language " is too " heighlevel!!!"))


I like heigh level like lisp.
Adding libraries and the like is good, as long as they've got intuitive interfaces, otherwise its pure anadulterated evil.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
CProgrammer
CProgrammer
Yes agree every language has its uses and for me its always been high level languages for smaller apps and lower level for major projects.
I guess thats because I like having full control and I like doing what I can do relatively fast myself. Like if I have an easy file io system like in c++ just doing the formatting myself.

Stodgy Old Programmer's Syndrome:
Possibly to some extent I find it said that c++ is gradually being substituted for c#. Possibly beacuse the extra knowledge needed for c++ is becoming obsolety in some fields.
But I dont mind learning new languages so in that your accusation isnt true. I even rather like c# for some fileds. I just find it smart to write in a language major projcts that is industru standard and i fear c++ going in this field:)

btw oluseyi: How would you know how old I am?

-CProgrammer
CProgrammer
CProgrammer
EDIT: I removed this particular post because the Issue has been resolved:) (Thanks Fruny and hplus0603).


-CProgrammer

[Edited by - CProgrammer on January 10, 2005 4:18:59 AM]
Derakon
Derakon
Most modern high-level languages don't force you to use the high-level constructs that they've made for you. Certainly they're available, but if you want to do something deep and gritty with your code, they aren't going to stop you. However, you can generally trust writers of official libraries to know what they're doing; hence, if there's something implemented in a high-level library and you want to do it yourself, chances are you're going to come up with a solution that's either less efficient or less general than what's in the library.

I'm all for laziness. Laziness is, when applied correctly, one of the great virtues of the computer scientist. Why replicate work when you aren't improving on the old, or even learning something new?

On a side note, I've always suspected that it was dangerous to even mention the moderation system here. *shrug*
Jetblade: an open-source 2D platforming game in the style of Metroid and Castlevania, with procedurally-generated levels
ukdeveloper
ukdeveloper
The ultimate HLL for me would be something like this (network logon script):

"I want a grey GUI to appear. There will be 2 textboxes, with white backgrounds, and they will use the font Tahoma, in bold. They will be dead centre, with a grey button marked "Log on" underneath. The top one will take in details of the user's name, and the bottom one will take in the user's password. When the Apply button is clicked, the program will check a database stored at "\\file\bin\usrbase.dat" to see whether the username and password match up. If they do, the user can log on. If they don't, the user is told in a message box "Please check the username and password again."."

This looks like part of a design document, but if this was actual code, and typing this into your compiler and hitting F5 actually made it work, all I can say is, WOW.
Dmytry
Dmytry
reply:

It is simpler to make your own struct if you are coding small thing. If you would be coding big thing, you would need to write your own structs for pretty much everything, and i think that you would prefer to use somebody else's structs. So, DirectX's structs is a good thing for complex programs, and probably not a problem for small programs.

But if i would port my code to DirectX i would use my math lib instead of DirectX's thingies, because i don't want to make my mathematica things depend to DirectX. (as i might want to use them with other API or without API at all)

As about
Quote:

Or the file io system of C# and java where you need 2-3 classes linking to eachother to get started on just reading a file. I mean its good to have these in a library like boost or even standard but why no simple alternative.

i'd say, if you _really_ need to type too much to just open the file, it is lower level than if you need to type less. But maybe(i'm almost sure) that thing reduces amount of code for more complex applications, so it can be considered high-level.

some OT rant:
My personal opinion on "programming is getting too high level" is that we need to define what's "high level" is.

0: for really many programmers, low level = machine dependent, and it is absolutely wrong. Brainf**k is uber-lowlevel programming language, have not many commands, and it is absolutely machine independent... From other side, gammaplex is also "low-level", but have many commands.
For other programmers, something is high level if it works with many abstractions. I don't think it could be used as measure, it is possible to make OOP brainf**k[grin].

I think that non-trivialeness of programming, that is, amount of "high-level brain work" per token of source code(or something similar) could be better measure. Assembly have big code size, and is not less trivial than high-level C++ code that does same job. (conversion from high-level code to assembly code is absolutely trivial operation) (Conversion from high-level code to brainf**k is also trivial.)
ZedFx
ZedFx
Quote:
... and typing this into your compiler and hitting F5 actually made it work, all I can say is, WOW.
Lol! that would be fairly ammusing.

Quote:
The way the computer works is very little like the way humans think. Who cares how the computer works? It's more important for languages to provide efficient and effective means for humans to express the ways we think.
This is a stupid point to argue, how do you expect a computer to do what you want, ie. "what a human thinks" when you cant tell it in its own language (refering to low level languages)

Quote:
I don't really see the problem. I don't believe there are good and bad languages, but rather that all languages have their own specific application. Perhaps a lot of programmers who wants to develop high level software are moving up to the newer high level languages. So what? There will always be a need for lower level programming. That cannot be repalced by high level programming and standard librarys. Someone always has to do the low level work. Does that settle your fears?
There is a problem when application designers (that means us generally) want to do something low-level with a high-level language, and they cannot be bothered to delve into the low-level sections, or their hll does not provide an interface for low-level. This creates programs which are buggy, slow, inefficient, etc. and when you have all that in a program, you can throw "user friendly" out of the window. And herein lies the problem.
roos
roos
Quote:
Original post by staaf
I don't really see the problem. I don't believe there are good and bad languages, but rather that all languages have their own specific application. Perhaps a lot of programmers who wants to develop high level software are moving up to the newer high level languages. So what? There will always be a need for lower level programming. That cannot be repalced by high level programming and standard librarys. Someone always has to do the low level work. Does that settle your fears?

---
Staffan Einarsson


Amen
Wavarian
Wavarian
From a different perspective:

High level languages just give companies the ability to pump out 5 times the amount of software whilst paying their programmers the same amount of money.

(Yes I understand the advantages of a functional high-level language, but the only real winners in the industry are the companies themselves, unless you're a hobbiest).

Yay, now lets all get programming jobs once we graduate from college and make some other programmer's life a misery!! ^_^

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.