Git Product home page Git Product logo

gor's Issues

GOALS

  • Zero runtime exceptions
  • Safe interop with Javascript
  • Bundler included
  • Aggressive Tree shaking
  • Simple codebase for contribution: should be an absolute joy to contribute to the codebase
  • Deal elegantly with types "context"/"providers". Passing values through the component tree (cross cutting) but with type safety

COULD consider adding newline as a token

Inserting implicit semicolons is hackisch and comparing line numbers to distinguish between leading and line comments is also pretty bad: https://cs.opensource.google/go/go/+/refs/tags/go1.21.0:src/go/parser/parser.go;l=225

It could also improve code formatting.

Further acknowledged by the fact that the literal value of the "semi" colon is checked. in various places to separate an "implicit" vs an "explicit" one.

BUT: semicolon insertion seems common: https://www.reddit.com/r/ProgrammingLanguages/comments/w5m4l7/statementterminatorless_languages/

This should also allow decoupling of the parser, ideally it should only be dependant on the scanner. Not on the underlying file representation (except for error handling)

OR, maybe the comment token should carry more info about the line structure (since we only use it for lead/line information)

NAMES

goweb (gow.dev, goweb.dev, goweblang.com)

SHOULD figure out what isRHS and token precedence logic have to do with each other

During expression parsing:

func (p *parser) parseBinaryExpr(x ast.Expr, prec1 int) ast.Expr {
	if p.trace {
		defer un(trace(p, "BinaryExpr"))
	}

	if x == nil {
		x = p.parseUnaryExpr()
	}
	// We track the nesting here rather than at the entry for the function,
	// since it can iteratively produce a nested output, and we want to
	// limit how deep a structure we generate.
	var n int
	defer func() { p.nestLev -= n }()
	for n = 1; ; n++ {
		incNestLev(p)
		op, oprec := p.tokPrec()
		if oprec < prec1 {
			return x
		}
		pos := p.expect(op)
		y := p.parseBinaryExpr(nil, oprec+1)
		x = &ast.BinaryExpr{X: x, OpPos: pos, Op: op, Y: y}
	}
}

COULD provide easy extensibility

Extensibility usecases

  • Adding Linting rules
  • Add bundling of files (how to encode, how to return url)

Entensibility possibilities

  • Should just include a package in the file with the go:generate (call a method to configure)
  • Or, add an executable with gor-<name> for cross language extensibility (e.g protobuf)

Easily add linting rules through adding

  • Add executable with given names gor-
  • Or, go API

SHOULD think about how to allow for creating types that accept certain elements

When building the crewlinker/nxt ui it is common to type a component property with the requirement that it only accepts certain other components (only SVG, only img tag, or only certain other components)

This should be easy to do

Also, it should be easy to type what kind of child elements a custom component accept. In fact, why is there no type checking for build-in html elements being nested inside others in Current frontend frameworks?

See: https://stackoverflow.com/questions/57627929/only-allow-specific-components-as-children-in-react-and-typescript

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.