preview

Sequence Matching And Pattern Matching

Better Essays

INTRODUCTION : Pattern matching is a programming language method which is considered as important in functional programming. It is uses STRING MATCHING and PATTERN RECOGNITION. The main job of pattern matching is to check and decompose data. The object-oriented programming languages do not have any particular method for this decomposition of data. So the Object-oriented programmers are in need for a solutions for this problem of decomposition .For that problem as a solution a built-in pattern matching construct is introduced which is compatible with object-oriented programming is proposed. And the data is to be defined separately for the operation on data to make matching useful. Pattern matching is presented in two ways, …show more content…

If the given input pattern matches , the pattern variables are bound to corresponding parts in the input value and the relative branch is executed in the an environment that improves with the pattern variable bindings. Pattern has sequence or tree structure forms and pattern matching uses back tracing techniques. The object-oriented way of analyzing and performing operations on data: Object-oriented design is a method and style for software system development that amounts to encapsulating data and operations in abstractions. This method produces some abstractions that are usually implemented in an object-oriented programming language, which supports the object oriented style through its syntax and semantics. It does so by providing an object model and by offering built-in methods for object construction, method calls, field access and deletion of objects. Classifying abstractions and taking them apart into their subcomponents is not a built-in construct of object-oriented programming languages.
Pattern matching will offer: Not only Readability and security, a high-level method for pattern matching provides optimization and static checks. The disadvantage of object-oriented solutions which are mentioned above is that the standard compilers can not check hand-written case distinctions are based on type-tests and type-casts cover all the cases, or all branches can actually be entered. Pattern matching

Get Access