Sepples is the influenza to Java's common cold. For your first language, FIOC is your best bet.
Name:
Anonymous2012-06-12 15:41
>>7
>learning FIOC as a best language
I know that FIOC encourages indentation habits (not good indentation habits, necessarily, but indentation habits nonetheless) but it's not a good first language.
C is a good first language. C separates the boys from the men. Can't manage your own memory? Go fuck yourself. Can't implement objects without classes? Go fuck yourself. Can't do anything without hand-holding? Go fuck yourself.
C is like that harsh old teacher in kung-fu movies where the protagonist starts off as a lazy kid but eventually learns disciprine and becomes a kung-fu master.
C is a good language for beginners. It's very simple (but that does not imply easy) and feels closer to the machine than any other high level language. Later you can move on to C++ just because it makes your life easier when designing large software. If you have any say in it, don't use Java or C#.
An object is just an implementation of a data structure that can self modify through methods and make some of its data unreachable to programmers through encapsulation. You can point to it just like you would a struct or an array and modify it just the same.
If pointers and objects don't mix well in your mind, then you either do not understand pointers, or you do not understand how objects are represented in memory.
Name:
Anonymous2012-06-13 2:45
>>17
that isn't the best way to think about object. no not at all. I don't see the magic p word anywhere in your post either.
Name:
Anonymous2012-06-13 11:47
>>17
It's better to think of objects as things which have state and behaviour. A computer monitor has states: on, off, idle/power-saving, hsync, vsync, etc., and it has behaviours: turn on, turn off, idle, stop idling, redraw. A keyboard has states: caps lock on, num lock on, scroll lock on, shift down, ctrl down, alt, down, etc. and it has behaviours: press key, release key. A computer, then, can be modelled as a series of interacting objects - when the keyboard's pressKey and releaseKey methods are called they can send messages to the PIC, etc.
Everything is all just integers in the end. An object is just a series of integers where some of those integers can't be manipulated from = statements, and which can operate methods on itself to access those integers in a way that is safe for the user.
>>9
Oh, I can into C. But Sepples frustrates the shit out of me.
Name:
Anonymous2012-06-14 17:54
Learn Java first, dont learn FIOC first, FIOC takes a lot of shortcuts. Java has static typing and forces conventional OO. You need to learn OO because about every popular programming language in use today has it. Get the book "Head First Java", it is the best book for learning OO and Java. After you learn Java, learn Scala as your second language so you can find out how to break out of the OO style of programming and learn functional programming as well. After those two languages you can then learn C as your third language
Like OO? Learn Ruby. Ruby is pure OO. Java is not pure OO because it has primatives, which Ruby has none of. Even the numeric literal 1 is an object with its own methods. Even the class Fixnum, which 1 is an instance of, is an object in and of itself.
In fact, just about the only thing you can send the message (:is_a?, Object) to would be BasicObject.new, which doesn't respond to the message is_a?, or even inspect for that fucking matter.
Meanwhile, In Javaland, integer literals and floating point literals are not objects. There are objects to wrap around them, but the literals are not encapsulated by those Objects.
>>24
Ruby OO is nice as far as scripting languages go. But there is only so far you are going to get with a dynamically typed language, basically you are always going to be limited to scripting level programming. You should learn D that is statically typed and will give you fast running compiled programs. D will allow you to progress to building large scale industrial quality programs, Ruby is just a nice tool for small jobs.