for me, c should contain only:
signed/unsigned:
byte = 1 byte
dbyte = 2 bytes
qbyte = 4 bytes
obyte = 8 bytes
d like double, q like quad, o like octal.
dbyte a, b;
a = b = syntax error
*ds:a = b should be mov dword [ds:a],dword b
*ds:a = *es:b = mov eax,dword [es:b]/mov dword [ds:a],eax
like in assembler.
and thats it.
for more complex types make structures.
cpu dont operate on other.
So why there are milions of types like size_t, lpword, u_int, and many many many others. Why not make c simple? Too many unclear types that even google had problem deciphering is main reason why i despise c and laugh at anyone having problems with it.
exotic types
Started by
Guest_h4x_*
, Sep 29 2009 01:28 PM
25 replies to this topic
#1
Guest_h4x_*
Posted 29 September 2009 - 01:28 PM
Guest_h4x_*
|
|
|
#2
Posted 29 September 2009 - 01:38 PM
I usually just use int, float, double, char. I avoid making things more complicated than they have to be.
Root Beer == System Administrator's Beer
Download the new operating system programming kit! (some assembly required)
Download the new operating system programming kit! (some assembly required)
#3
Guest_h4x_*
Posted 29 September 2009 - 01:44 PM
Guest_h4x_*
oh yes, also add fpu to the list.
#4
Posted 29 September 2009 - 01:47 PM
You realize that the types you cited as examples of complex types (size_t, u_int) are just typedefs of standard types (like int), right? The reason it's done like that is because of implementation specific details, such as size_t possibly being something other than an int (in the case of 64-bit implementations). There's nothing complex about these. O_o
Wow I changed my sig!
#5
Guest_h4x_*
Posted 29 September 2009 - 02:40 PM
Guest_h4x_*
belive me, if you have no idea if its 8 or 4 bytes, and later you fing out its 996 bytes you get frustrated.
#6
Posted 29 September 2009 - 04:31 PM
One of the goals of C is to abstract away some of the hardware details. If you want to work that close to the hardware, stay on assembly.
#7
Posted 29 September 2009 - 06:04 PM
Sadly h4x, you're incompetent, constantly hammering x86 for not being what you expect it to be - maybe if you stopped refusing to read the manuals, it would make sense.
Same with C. You don't seem to understand even the basics, and would rather the world become perfect for you. Enjoy even more -rep.
On another note, C is simple. Its very simple, much easier then most functional languages and easier then many other languages. Simply because you find it challenging (likely along the lines of having to change your diaper) does not make it so for the average population.
Same with C. You don't seem to understand even the basics, and would rather the world become perfect for you. Enjoy even more -rep.
On another note, C is simple. Its very simple, much easier then most functional languages and easier then many other languages. Simply because you find it challenging (likely along the lines of having to change your diaper) does not make it so for the average population.
#8
Guest_h4x_*
Posted 30 September 2009 - 01:48 PM
Guest_h4x_*
ok simple task, execute lock instruction in c.
GOOD LUCK.
c is good as showing to someone how algo works, nothing more.
if you think hardware independent then ur incompetent to translate the code.
GOOD LUCK.
c is good as showing to someone how algo works, nothing more.
if you think hardware independent then ur incompetent to translate the code.
#9
Posted 30 September 2009 - 02:07 PM
h4x said:
ok simple task, execute lock instruction in c.
Like WingedPanther said, if you need assembly, use assembly. If you would like to understand C, take the time to learn it.
[edit]File this thread under vaxocentrism, circa 2000: "all the world's a PC". :rolleyes:
#10
Guest_h4x_*
Posted 30 September 2009 - 02:16 PM
Guest_h4x_*
perhaps we differ in it.
i prefer to have lots of code, and errors that i know what they mean and how to solve them.
In c, you have nothing. Many many versions of it, you have to worry about each header file, most harder features are really big pain in the ass. You have usually tons of meanless files, wich you have to waste hours to understand. And in most cases constants are not constant and 0 is 1 on other ssytem, thus creating race condition bugs or even size mismatches. Yes it is easy when you have nice multi-gigabyte IDE written by micro$oft and all you have to worry is a bsod here and then, code is generated by itself, almost... And not forget this awesome size and speed, hello world can be up to 800 times larger than it should be.
I really had bad past with c, it is my enemy, as other stupid thing made to make life easier. Sorry, wrong approach, FAIL, let me do the job.
i prefer to have lots of code, and errors that i know what they mean and how to solve them.
In c, you have nothing. Many many versions of it, you have to worry about each header file, most harder features are really big pain in the ass. You have usually tons of meanless files, wich you have to waste hours to understand. And in most cases constants are not constant and 0 is 1 on other ssytem, thus creating race condition bugs or even size mismatches. Yes it is easy when you have nice multi-gigabyte IDE written by micro$oft and all you have to worry is a bsod here and then, code is generated by itself, almost... And not forget this awesome size and speed, hello world can be up to 800 times larger than it should be.
I really had bad past with c, it is my enemy, as other stupid thing made to make life easier. Sorry, wrong approach, FAIL, let me do the job.
#11
Posted 30 September 2009 - 02:34 PM
The best way to give types more 'meaning' is to use typedefs.
But anyway, you're saying a programming language made in the 70's is hard and complicated. Considering it was made in the stone age where standards didn't exist, it's not hard to see why there's so much nonsense with it.
And naturally my Uni decided we'd learn it, simply because it's so tricky. -_-
If you want simple C, maybe try C++? :P
But anyway, you're saying a programming language made in the 70's is hard and complicated. Considering it was made in the stone age where standards didn't exist, it's not hard to see why there's so much nonsense with it.
And naturally my Uni decided we'd learn it, simply because it's so tricky. -_-
If you want simple C, maybe try C++? :P


Join Dashing today! http://www.dashing.co.nr
#12
Posted 30 September 2009 - 02:49 PM
You have no idea what you're saying fantaonice. XD
C++ is hugely more complex than C ever dreamed of being. I can prove it: Templates.
You'll also need to become familiar with all the intricate ways objects interact with each other.
C is easy, and actually quite straightforward in comparison. I still love C++ though.
C++ is hugely more complex than C ever dreamed of being. I can prove it: Templates.
You'll also need to become familiar with all the intricate ways objects interact with each other.
C is easy, and actually quite straightforward in comparison. I still love C++ though.
Wow I changed my sig!


Sign In
Create Account

Back to top










