flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > Creating a object-oriented programming language... Goto page 1, 2 Next |
Author |
|
vid 26 Oct 2006, 22:26
i am doing many thinking with OOP things in FASMLIB. i am slowly going through way that resulted into creating OOP. It sure has it's point, but this point is seldom understood by people who use it. Same as with assembly
|
|||
26 Oct 2006, 22:26 |
|
sylwek32 26 Oct 2006, 22:42
@vid..
fasmlib is great.. i will try it out. |
|||
26 Oct 2006, 22:42 |
|
Reverend 27 Oct 2006, 21:52
Isn't it better just to get used to one of existing languages? You have a lot of programming languages, and surely one will suit you. Let people who are specialists design them, and let programmers learn/use them. Of course you may find some bugs/stupidities in every language, but still I don't see a point in designing one on your own. Maybe just for educational resons, id so then try your best.
|
|||
27 Oct 2006, 21:52 |
|
vid 27 Oct 2006, 22:29
sylwek32: for now it is more like set of useful routines. real tight library will come with next version, where you will have streams and input.
Unfortunatelly, there is delay in releasing it... you can't imagine things that need to be solved for it to work at least like libc. anyway, let me know how you (dis)like it, or if there are any problems. |
|||
27 Oct 2006, 22:29 |
|
edfed 02 Nov 2006, 11:50
i am trying to make it
but not really like object files it is a file system object file as the files have extension in windows, the object have a type code who determinate what is it if it's a bmp, then the macrofile refer to it like this: macrofile: size_in_bytes dd @f-$-4 @macroroutine dd routine0 @1st_object rd 1,@routine rd 1 @2nd_object rd 1,@routine rd 1 etc... @@: it works very well for 3dmacros and panels macros
Last edited by edfed on 29 Jul 2008, 00:18; edited 1 time in total |
|||||||||||||||||||||
02 Nov 2006, 11:50 |
|
RedGhost 01 Dec 2006, 10:38
If you want a really solid object oriented language I suggest C#, it has finalizing, operating overloading, multi-inheritance, explicit member implementation, garbage collection and etc. On the plus it also allows you to load unmanaged modules, call unmanaged functions and use pointers of nearly every type. It is also somewhat platform independent with Windows and Linux support.
_________________ redghost.ca |
|||
01 Dec 2006, 10:38 |
|
vid 01 Dec 2006, 12:56
RedGhost: If you know assembly, then there is no reason not to use C++. You will understand it, it is as low as OO language can be etc.
.NET has disadvantage of ~25 MB runtime, and of shitty stack-machine MSIL (which just can't be compiled to good x86 code) |
|||
01 Dec 2006, 12:56 |
|
Raedwulf 01 Dec 2006, 14:10
vid wrote: RedGhost: If you know assembly, then there is no reason not to use C++. You will understand it, it is as low as OO language can be etc. vid: a reflection of my own mind or is it the other way round An alternative to C++, slightly less OO, bit more C-ish (and C-compatible) http://en.wikipedia.org/wiki/Objective-C Just a thought.... _________________ Raedwulf |
|||
01 Dec 2006, 14:10 |
|
RedGhost 01 Dec 2006, 15:22
vid wrote: RedGhost: If you know assembly, then there is no reason not to use C++. You will understand it, it is as low as OO language can be etc. C++ is no where near the level of OOP that C# is, this is why C# was created. Let's not forget there was always managed C++. _________________ redghost.ca |
|||
01 Dec 2006, 15:22 |
|
vid 01 Dec 2006, 15:54
RedGhost: as long as you take OOP as "programming paradigm" yes. But looking at it from reality side, what was OOP:
- we got C. But how the do the proper resource releasing? After anything that can cause error, you need free all resources that are taken (allocated memory, opened files). Can we make this process automatical? - well, let's make some common interface to free up any kind of resource. Let there be Destructor. - but how do we know which ones to free? - we can make common interface to take resources too. Let there be Constructor and that is about all of OOP from my point of view. You have SEH in strutured programming too, of course. All classes in inheritance are just about extending this interface. Or COM objects are another extension to this interface (which allows sharing of objects). |
|||
01 Dec 2006, 15:54 |
|
Raedwulf 01 Dec 2006, 18:03
C# would be nice if it wasn't bloated.NET fullstop.
And Mono/.NET compatibility is much less than desired. Awful in fact... If you are desperate you can make a very nice Object-Oriented FASM just using FASM's macros . Constructors, Destructors and Inheritance etc. etc. But where as Object-orientation is all good and clever, you can still make an equivalent, easily manageable modular system which surpasses the class version in speed.... C++'s main advantage IMO is template classes. Its a really clever idea and they say C can't do it(and for this case ASM too) but people forgot <macros> I maybe talking a bit of garbage right now, but I believe my ideas are true, its just that I need to sit down and prove them . vid could you verify this for me? Cheers. |
|||
01 Dec 2006, 18:03 |
|
vid 02 Dec 2006, 01:01
Raedwulf: no need to verify anything. OOP can be implemented neatly by FASM macros. It would be better than C++ in some areas, worser in others. Generally, it would be worser than C++
OOP is great thing. But 99.999% people using it have no idea about what it is, and why, and they use it everywhere. Even where it is not needed. When you go apart from "OOP is programming paradigm", you find out that OOP is making different things beheaving same way, eg. providing common interface for different things. Construction and Desctructor is always-present example of this. In case of COM objects, AddRef and Release are another examples. In case of inheritance, parent object is the interface. And you can put things under same interface pretty neatly under C, plus the compiler doesn't hide this aspect behind "paradigm". generally, OOP is *good* thing. But only for people who understand it. |
|||
02 Dec 2006, 01:01 |
|
Raedwulf 02 Dec 2006, 16:58
vid wrote:
Yes I agree. vid wrote:
I got a bit off topic, i meant it probably be faster than C#, but yes C++ is faster. Cheers. _________________ Raedwulf |
|||
02 Dec 2006, 16:58 |
|
OzzY 03 Dec 2006, 02:00
The idea of OOP language built with FASM macros would be very educative.
But as for existing languages: If you want a really good OOP language try D. It's similar to C#, but without targeting the .NET framework. It's native compiled code, that run as fast as C++ (may be slower in very rare cases, and sometimes is faster). It has lots of good features like dynamic arrays, unit testing system, version control system, very good core library, optional GC, compatibility with C (very few changes to make your C code work in D), helpfull community, nice IRC channel, growing language that can be the future beside C#. I've been using it for quite a few weeks and I must say that I found my favorite language (it has all things I like from C and C++ and it does not has all things I hate about C,C++, C# and Java). So, why not try? Official site: http://www.digitalmars.com/d/ Nice site with DFL GUI library (very similar to WindowsForms) + Entice GUI Designer and other things: http://www.dprogramming.com/ IRC channel: #D on freenode Just to let you know: I'm planning about building my new project in D. It's an utility to make FASM applications faster to develop and deploy (it's a console-based IDE). It's a new concept. |
|||
03 Dec 2006, 02:00 |
|
Raedwulf 04 Dec 2006, 08:39
Yes, I've been following D, I was wondering however can GDC target 64-bit? I believe it requires 64-bit libraries - not sure. Apart from that minor issue it looks to be a very promising language.
Cheers. |
|||
04 Dec 2006, 08:39 |
|
tantrikwizard 03 Jan 2007, 15:43
sylwek32 wrote: Has somebody on this board try to make an own I've written an OO language called OOB (oo basic) similar to C#. The compiler produced TASM source from OOB source which could be compiled into a binary. I like the C# syntax but cant stand the need for the .NET framework. Interpreted code sucks and doesn't produce a machine code binary. I used Gold Parser by Devin Cook for the parsing. http://www.devincook.com/goldparser/ which is a great product. The parsing is the most difficult part and Gold takes care of that headache for almost free. Given the power of Gold, i began an x86 emulator in addition to the compiler but never got around to finishing it. My compiler had a few optimization options but nothing like what is possible with mainstream compilers. Most mainstream compilers have some very intellegent optimization which would take a long time to fully comprehend. |
|||
03 Jan 2007, 15:43 |
|
tantrikwizard 23 Jan 2007, 20:08
RedGhost wrote: ...I suggest C#, it has...multi-inheritance... Actually it only supports single inheritance though you can implement multiple interfaces. |
|||
23 Jan 2007, 20:08 |
|
edfed 26 Jun 2007, 13:53
coding result always in a machine code
so C,C++ and else exists only for the capitalist challenge create slow programms very fast and i think that the people who don't code in asm are tired but people who code asm are crazy |
|||
26 Jun 2007, 13:53 |
|
Maverick 26 Jun 2007, 14:40
Actually C,C++ and else may also exist so you can do more interesting things in your life with your limited time. Otherwise when you're old it may happen someday that's the day you have to die, and you've only finished two big programs in asm.
|
|||
26 Jun 2007, 14:40 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.