WYSIWYG HTML Editor == Dreamweaver
Ideas I would like to build / see built
21–30 of 36 posts
Re: Ideas I would like to build / see built
#22Earlier quoted context omitted.
Disagree C has classes. No "class" and no inheritance or polymorphism. C++ and Objective-C have these things. But I understand what you're saying. There is the very well-known structs+functions technique which gives a partial stand-in for full OO. My post was meant to be funny yet true. I read the OA and thought all of the ideas he listed already exist, and was surprised it made the front page on Hacker News. Then I…
Disagree C has classes. No "class" and no inheritance or polymorphism C has perfectly good inheritance: struct child { struct parent p; // new variables go here } struct child foo; struct parent * bar = &foo; // perfectly valid C
Is my C that rusty?
For example, say that the "struct parent" type (which in your example has no members) had a member named z. In your example, I expect to be allowed to do something like this:
(*bar).p.z
which is composition. But not: (*bar).z
which would be member inheritance. Because bar/foo/child all lack a z member. Only "parent" has a z member. Am I wrong?Re: Ideas I would like to build / see built
#23Re: Ideas I would like to build / see built
#24WYSIWYG HTML Editor == Dreamweaver
Browser rendering the same HTML file that is loaded in your editor.
Edit.
Save.
Hit refresh in browser.
Optionally: add a simple, development-class web server (like web.py).
Bingo, done.
I guess I feel like the "editor" and "render" parts of the problem are already solved. I'm not sure that we gain more than we lose by trying to smash them together into one gob. For debugging/tweaking an existing web app, sure (then use something like Firebug), but for general development from scratch there are a lot of benefits to using a real browser and real editor.
Re: Ideas I would like to build / see built
#25Earlier quoted context omitted.
Disagree C has classes. No "class" and no inheritance or polymorphism C has perfectly good inheritance: struct child { struct parent p; // new variables go here } struct child foo; struct parent * bar = &foo; // perfectly valid C
Looks like composition and a struct alias, not inheritance to me. Is my C that rusty? For example, say that the "struct parent" type (which in your example has no members) had a member named z. In your example, I expect to be allowed to do something like this: (*bar).p.z which is composition. But not: (*bar).z which would be member inheritance. Because bar/foo/child all lack a z member. Only "parent" has a z member.…
struct child {
struct parent {
int z;
} p;
} foo;
you can access foo.p.z but not foo.z -- but you can access (struct parent *)(&foo)->z, so you can pass foo to anything which expects a struct parent.Re: Ideas I would like to build / see built
#26Earlier quoted context omitted.
Looks like composition and a struct alias, not inheritance to me. Is my C that rusty? For example, say that the "struct parent" type (which in your example has no members) had a member named z. In your example, I expect to be allowed to do something like this: (*bar).p.z which is composition. But not: (*bar).z which would be member inheritance. Because bar/foo/child all lack a z member. Only "parent" has a z member.…
It's valid C to cast a structure to the type of its first element. So in the example of struct child { struct parent { int z; } p; } foo; you can access foo.p.z but not foo.z -- but you can access (struct parent *)(&foo)->z, so you can pass foo to anything which expects a struct parent.
Re: Ideas I would like to build / see built
#27Earlier quoted context omitted.
I'd like a language like C but with classes C already has classes. They're called structs. And methods are called function pointers.
Disagree C has classes. No "class" and no inheritance or polymorphism. C++ and Objective-C have these things. But I understand what you're saying. There is the very well-known structs+functions technique which gives a partial stand-in for full OO. My post was meant to be funny yet true. I read the OA and thought all of the ideas he listed already exist, and was surprised it made the front page on Hacker News. Then I…
Re: Ideas I would like to build / see built
#28Earlier quoted context omitted.
It's valid C to cast a structure to the type of its first element. So in the example of struct child { struct parent { int z; } p; } foo; you can access foo.p.z but not foo.z -- but you can access (struct parent *)(&foo)->z, so you can pass foo to anything which expects a struct parent.
I'll assume you're right. Thanks for pointing that out. Your C sounds fresher than mine. I used it heavily from 90-95 or so but later moved on to higher languages like Java and Python. If what you point out about the syntax is accurate, I find that to be a counter-intuitive design decision.
Child Struct:
+---------------+-----------------+
| parent struct | child fields |
+---------------+-----------------+
^
\--- pointers to the struct point at the start
You can cast this child struct to a parent struct, which is like saying 'interpret memory starting here as a 'parent' struct'.This works: The memory from location to location+sizeof(parent) IS a parent struct. The child fields following the parent struct are simply ignored.
Re: Ideas I would like to build / see built
#29Also, you might be interested in a free game by the name of Skyrates (http://www.skyrates.net). It's not really an MMO, but it was made for people with not much free-time in mind so it doesn't favor people sinking a lot of time into it.
Re: Ideas I would like to build / see built
#30Earlier quoted context omitted.
Disagree C has classes. No "class" and no inheritance or polymorphism. C++ and Objective-C have these things. But I understand what you're saying. There is the very well-known structs+functions technique which gives a partial stand-in for full OO. My post was meant to be funny yet true. I read the OA and thought all of the ideas he listed already exist, and was surprised it made the front page on Hacker News. Then I…
OOP != Class Inheritance