Git Product home page Git Product logo

hyperjs's Introduction

HyperJS - JavaScript in C#
Project initiated by Tony Heupel (pronounced "High-pull")
===========================
Copyright 2010 (C) Tony Heupel

Contents:
  HyperJS - a.k.a. JS.cs:    JavaScript-like programming in C# using closures and dynamics.  
    This is a lame attempt at creating JavaScript in C# just to see how the
    HyperHypo class holds up to being similar to JavaScript style in C#; not
    necessarily because it's a good idea to write C# in JavaScript--because 	it's not...

    That being said, it's just a fun weekend project for me right now and is
    stretching my brain and expanding my knowlege of JavaScript and C# 4.0.
    
    Boolean is the only thing that actually resembles JavaScript (and has unit tests), 
    but it uses C# constructs to do it.  I suspect that once I get Object.valueOf and
    the other core JavaScript conversions in place, it will look nothing like it does 
    now; but at least I have tests to prove it!
  
    This is based on my HyperCore libraries with HyperDictionary (dictionary
	implementation with prototype-style "inhertance") and HyperHypo (dynamic
	C# class that support JavaScript-style prototype inheritance using
	a HyperDictionary as the Member Provider.
    Hyper - "More than" C#
    Hypo  - "Less than" JavaScript.

  HyperJS.UnitTest: Unit test that cover HyperJS implementations.

hyperjs's People

Contributors

heupel avatar

Stargazers

 avatar

hyperjs's Issues

Implement all classes based on the JS Object!!

This, along with implementation of valueOf and toString will make EVERYTHING easier. Even the current Boolean function should just follow the standard JS type conversion of valueOf then toString, etc.

Relying on native .NET types is screwing with things like feature detection and treating functions as first-class citizens. We simply need to be able to box everything in terms of Object or Function, I think.

Investigate other parameter definition styles

Maybe use param[] args to simulate javascript "args" that is passed to each function when defined inside a method. Issues around things being positional instead of key/value pairs potentially...maybe use a hash/dictionary if that works.

I think we want to avoid optional parameters. Maybe use overloads for Intellisense niceness when defining non-dynamic versions of the function definitions and ensure proper args parameter position in there?

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.