Skip to content

STD: Recreate OS dependant handlers. #9

@TheNachoBIT

Description

@TheNachoBIT

Its mostly easy to implement, although it needs this enhancement first to make it possible: https://github.com/nucleus-lang/nucleus/issues/5

The idea is to have a global struct called STDHandler that can act as a platform-agnostic data handler.

In there you will be able to see all of the parameters you need for each OS that this programming language will support.

Although making it 100% independant from OS stuff is hard on Windows because all of the handlers are API-dependant instead of running through a file system like Linux does. So for Windows you gotta need a C++ include from Windows.h

But despite all of this, we can make it independant from C++'s STD and use whatever API the OS currently has.

struct STDHandler
{
    # Windows.
    var WindowsHND: int = -11;

    # Linux
    var LinuxHND: string = "path/to/stdout/file";
};

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions