Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BlakPilar

Pages: 1 ... 38 39 [40] 41 42 ... 49
586
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 17, 2011, 04:11:33 pm »
Hmm... I'd have to check about the "manipu-thread" (catchy, eh? ;)) thing and the loops-as-objects thing. I have an idea for the object one, but I'd have to wait until the compiler gets more complete to test it out :/

587
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 17, 2011, 04:01:49 pm »
Lemme take another shot at it... A type of thread that is basically a group of loops that can manipulate/"talk to" each other?

EDIT: Broseph, I'd have to make a class inside the compiler, but I might be able to treat loops like objects.

588
Miscellaneous / Re: Post your desktop
« on: August 17, 2011, 03:55:56 pm »
Spoiler For Profanity:
Holy shit that is a badass background!
* Freyaday wants
You can have it and others that I use here :3 (that one is 024 out of 031)

589
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 17, 2011, 03:40:01 pm »
So like... Nested loops that aren't nested?

590
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 17, 2011, 01:53:00 pm »
Sometimes a while or for loop just doesn't cut it...
What about a subroutine? Or function?

Spoiler For settling the debate about what I mean about that -_-:
Here's the definitions in the AST:
Code: [Select]
        //Method: same as a function, it just doesn't return anything
        //[modifiers] sub [name] ([arguments]) [[ {{ code }} ]]
        public class Method : Stmt {

            public Stmt[] Modifiers;
            public string Name;
            public Stmt[] Args;
            public Stmt[] Code;
       
        }

        //Function
        //[modifiers] [return type] [name] ([arguments]) [[ {{ code }} ]]
        public class Function : Stmt {

            public Stmt[] Modifiers;
            public Type Return;
            public string Name;
            public Stmt[] Args;
            public Stmt[] Code;

        }

591
Miscellaneous / Re: Post your desktop
« on: August 17, 2011, 12:49:55 pm »
Here it be:
Spoiler For Desktop:


592
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 17, 2011, 11:11:56 am »
Add Darl181s to this language!!!
Spoiler For what I'm talking about:
Add Gotos. What did you think I was talking about? <_<
Hmm... Why?

593
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 16, 2011, 07:51:04 pm »
Hey, if you can think of a new loop and at least it's equivalent in VB or C#, I'll do my best to implement it :)

And I can't wait to try it out either, and hope it catches on too, but I need to at least get the layout finalized and get the compiler ready for a couple of controls :/

594
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 15, 2011, 09:31:21 pm »
Yeah, I agree now. I tried making a few sample dummy codes and I constantly typed " before ', so I'll just leave strings to be what every other programming language does. If I do implement chars, though, I'll make it similar to C# and use 's to define char literals.

Also, DERP on my part. I forgot about loops <_<

595
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 15, 2011, 09:16:32 pm »
Nah, it's more of my bad because I assumed that that was how those were generally defined. But, you know what they say about assuming ;)

596
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 15, 2011, 08:13:31 pm »
How would having a "separate command" add confusion? C# has "null" and "void" which are essentially the same thing. The only difference (between methods and functions) is in voids, nothing is returned because it doesn't take "void" or "null" as an actual type definition.

When I was taught programming in school, I was told that a subroutine could or could not be passed any number of items and it could choose to directly modify those items or use them to modify something else within the program, and a function could or could not take arguments but returned some kind of value whose type was not null or void, but it could be null in value.
So this would be a subroutine (NOTE: in the class that I took, we used VB6; I'm just applying my learning to C#):
Code: [Select]
private void RoutineName(<any number of modifiers>) {

    //do stuff, but don't return anything

}
And this would be a function:
Code: [Select]
private <any type that's not null or void> FunctionName(<any number of modifiers>) {

    //do stuff

    return <variable that is the same type as that specified in the function definition>; //This was the key difference between a function and a subroutine; this actually returned something

}
That's what I mean when I talk about that.

597
Computer Projects and Ideas / Re: new Event based OOPL idea
« on: August 15, 2011, 07:41:18 pm »
Do I smell a possible collaboration? :O

EDIT: I meant for the envrionment.

598
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 15, 2011, 05:27:21 pm »
I should post about my project of making a programming language...
You should.

Also...
Another thing: the subroutine thing has little point if it *takes* arguments but doesn't return anything.  The function thing is on the right path, though I think you should just stick with the function thing but call it a sub instead (so that way if you in the future decide to add real functional aspects to the language, you don't have to completely re-invent everything)

I disagree. You can have a subroutine that takes arguments yet does not return anything. Especially if you use that subroutine over and over.

For example, before I started using SharpDevelop's TextEditor, I attempted to make my own. In that, I had a subroutine called Reset, and it looked like this.
Code: [Select]
private void SetCurrent(Color highlight, int pos, int len) {

    this.SelectionStart = pos;
    this.SelectionLength = len;
    this.SelectionColor = highlight;

}

I could use that whether I was highlighting a word, or just setting the colors back to normal to resume typing.

Keeping "sub" and "<any type other than sub>" will also help with organization and readability, in my opinion.

599
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 15, 2011, 12:59:10 pm »
@Ashbad, alright, I think I understand and can probably implement that.

@SirCmpwn, the goal is just to be a usable OOPL. I know other .NET languages are more widely used, but I just think it'd be neat to have a language to call my own ;D

600
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 15, 2011, 12:15:23 pm »
@HOMER, if that'd be easier to help identify if vars are global or internal, sure, I'll add that. As for the other-language thing, again, nice idea. I think if I did that, though, I would probably have the other-language code be on its own page and have "#imports <file name>;" or something similar at the top.

@Ashbad, for enums, do you mean something like this?
Code: [Select]
int hello = 5;
private enum Test [[
  Times2 = hello * 2,
  Plus2 = hello + 2,
  etc.
]]
As long as the variable used to modify the values is local, I'm sure it wouldn't be too hard to implement. If I can't do that, though, would something like an enum but called a "typegroup" (name off the top of my head :P) that can do that be sufficient? As for "var" I just thought that would be nice because I know that's something people who use Python really like about it. But, if it's redundant, I'll remove it. And I know classes are a must, but are namespaces?

Pages: 1 ... 38 39 [40] 41 42 ... 49